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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date: Sat, 22 Jun 2024 12:15:17 +0000
From: Zac Ecob <zacecob@...tonmail.com>
To: "bpf@...r.kernel.org" <bpf@...r.kernel.org>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Returning negative values repeatedly from a SOCK_FILTER ebpf prog stalls kernel thread

Problem is title. Attached is files for repro. Working on v6.10-rc4. 

After doing some investigation, the `sk_wmem_alloc` member of `struct sk` seems to only be increasing, presumably missing some refcnt_dec somewhere.

At a certain point, in `sock_alloc_send_pskb`, we fail the check:

`
if (sk_wmem_alloc_get(sk) < READ_ONCE(sk->sk_sndbuf))
`

Upon which we enter `sock_wait_for_wmem` and schedule a massive timeout (at least that's what happened in my tests)


Please let me know if I need to add anything.

Thanks
Not sure where the missing refcnt subs are, must admit unfamiliarity with the network code.


Download attachment "repro.tar.xz" of type "application/x-xz" (2172 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ