[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241011012713.GA27167@breakpoint.cc>
Date: Fri, 11 Oct 2024 03:27:13 +0200
From: Florian Westphal <fw@...len.de>
To: Richard Weinberger <richard@...ma-star.at>
Cc: Florian Westphal <fw@...len.de>, Richard Weinberger <richard@....at>,
upstream@...ma-star.at, netfilter-devel@...r.kernel.org,
coreteam@...filter.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, pabeni@...hat.com, kuba@...nel.org,
edumazet@...gle.com, davem@...emloft.net, kadlec@...filter.org,
pablo@...filter.org, rgb@...hat.com, paul@...l-moore.com,
upstream+net@...ma-star.at
Subject: Re: [PATCH] netfilter: Record uid and gid in xt_AUDIT
Richard Weinberger <richard@...ma-star.at> wrote:
> Maybe I have wrong expectations.
> e.g. I expected that sock_net_uid() will return 1000 when
> uid 1000 does something like: unshare -Umr followed by a veth connection
> to the host (initial user/net namespace).
> Shouldn't on the host side a forwarded skb have a ->dev that belongs uid
> 1000's net namespace?
You mean skb->sk? dev doesn't make much sense in this context to me.
Else, please clarify.
ip stack orphans incoming skbs, i.e. skb->sk is gone, see skb_orphan()
call in ip_rcv_core(). So when packet enters init_net prerouting hook,
association with originating netns or sk is not present anymore.
Powered by blists - more mailing lists