lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240325063401.7d7f3d35@kernel.org>
Date: Mon, 25 Mar 2024 06:34:01 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Eric Dumazet <edumazet@...gle.com>
Cc: "David S . Miller" <davem@...emloft.net>, Paolo Abeni
 <pabeni@...hat.com>, netdev@...r.kernel.org, eric.dumazet@...il.com, Josef
 Bacik <josef@...icpanda.com>, Tetsuo Handa
 <penguin-kernel@...ove.sakura.ne.jp>
Subject: Re: [PATCH net] tcp: properly terminate timers for kernel sockets

On Sat, 23 Mar 2024 05:45:26 +0100 Eric Dumazet wrote:
> > On Fri, 22 Mar 2024 13:57:32 +0000 Eric Dumazet wrote:  
> > > +     if (!sk->sk_net_refcnt)
> > > +             inet_csk_clear_xmit_timers_sync(sk);  
> >
> > The thought that we should clear or poison sk_net at this point
> > (whether sk->sk_net_refcnt or not) keeps coming back to me.
> > If we don't guarantee the pointer is valid - to make it easier
> > for syzbot to catch invalid accesses?  
> 
> I do not think we should do this here.
> 
> Note that KASAN has quarantine, and can catch invalid UAF accesses anyway.
> 
> We could clear the base socket in sk_prot_free() but this will not
> make KASAN better.

I was thinking mostly about the kernel sockets being "special",
and therefore less well exercised by syzbot. But sk_net will
remain valid until all user space for that netns exists, IIUC,
so I take it back, the clearing has a real chance of adding bugs.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ