Re: [PATCH] SUNRPC: Avoid address overwrite with eBPF NAT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2023-08-17 at 02:09 +0000, Trond Myklebust wrote:
> On Wed, 2023-08-16 at 20:48 -0500, Jordan Rife wrote:
> > [You don't often get email from jrife@xxxxxxxxxx. Learn why this is
> > important at https://aka.ms/LearnAboutSenderIdentification ;]
> > 
> > kernel_connect() will modify the rpc_xprt socket address in
> > contexts
> > where eBPF programs perform NAT instead of iptables. In these
> > contexts,
> > it is common for an NFS mount to be mounted to be a static virtual
> > IP
> > while the server has an ephemeral IP leading to a problem where the
> > virtual IP gets overwritten and forgotten. When the endpoint IP
> > changes,
> > reconnect attempts fail and the mount never recovers.
> > 
> > This patch protects addr from being modified in these scenarios,
> > allowing
> > NFS reconnects to work as intended.
> 
> What? No! A connect() call should not be allowed to modify its own
> call
> parameters.
> 

To put it more succinctly, the struct rpc_xprt is one of many private
kernel structures. Parts of it can be exposed through public APIs, such
as the sysfs API that we're building, but when you use eBPF to hack
your way around those public APIs, then you're on your own. We're not
going to commit to support your hacks.


-- 
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@xxxxxxxxxxxxxxx






[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux