Re: unregistering tcp_ca struct_ops can cause kernel page fault

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

 



On 12/11/24 3:28 PM, rtm@xxxxxxxxxxxxx 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.





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux