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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ac054b6e-2120-4598-b960-ddd275714218@linux.dev>
Date: Fri, 13 Dec 2024 16:56:59 -0800
From: Martin KaFai Lau <martin.lau@...ux.dev>
To: rtm@...il.mit.edu
Cc: bpf@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: unregistering tcp_ca struct_ops can cause kernel page fault

On 12/11/24 3:28 PM, rtm@...il.mit.edu wrote:
> Martin,
> 
> When I build from bpf-next/master with a default .config, I do not get
> the crash.
> 
> When I disable CONFIG_MODULES, I do get a crash from tcpbps12a.c.

During make:

"WARN: resolve_btfids: unresolved symbol module"

Without going into the details, the bpf_try_module_get failed to bump the refcnt 
because of missing the "struct module" btf_id.

With a quick thought, I see bpf_struct_ops should be able to work around this 
CONFIG_MODULES=n.

I don't think it should though. The bpf_tcp_ca is using the "struct 
tcp_congestion_ops" which can be implemented by a kernel module and the kconfig 
wants nothing other than the built-in tcp-cc. I don't think the bpf_struct_ops 
should be a way to work around that. I think the right thing to do here is to 
also disallow attaching bpf_struct_ops when CONFIG_MODULES=n to fix this UAF issue.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ