Linux: bpf: Mark signal tracepoint siginfo arguments as scalar
What fixes it
- 05757377fa0447163d07c43a119f81abe1eef8dcLinuxCVE List
- 0e78cb242a57e481061fcb542fed4d51afba25c4LinuxCVE List
- 77515ab12e4983e6416f8c35039a3f0c0822ac70LinuxCVE List
- 6.12.114LinuxCVE List
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
In the Linux kernel, the following vulnerability has been resolved:
bpf: Mark signal tracepoint siginfo arguments as scalar
The signal_generate and signal_deliver tracepoints declare their info argument as a struct kernel_siginfo pointer. btf_ctx_access() therefore treats it as a trusted pointer for tp_btf programs.
Signal delivery also uses SEND_SIG_NOINFO and SEND_SIG_PRIV as special values for this argument. Those values are zero and one respectively, and are not pointers. A tp_btf program can currently dereference either value and fault the kernel. In particular, signal_generate can run from timer interrupt context, turning the fault into a kernel panic.
Record both tracepoints in raw_tp_null_args[] and mark argument one as a non-pointer. This preserves scalar access to the cookie while rejecting direct and helper-mediated pointer use. Merely marking it nullable would not suffice because SEND_SIG_PRIV is nonzero.
Text from CVE List
Affected versions 11
- Linuxaffected: b2fc4b17fc13810ef440fb323fad3981cd174985 before 05757377fa0447163d07c43a119f81abe1eef8dcCVE List
- Linuxaffected: 838a10bd2ebfe11a60dd67687533a7cfc220cc86 before 0e78cb242a57e481061fcb542fed4d51afba25c4CVE List
- Linuxaffected: 838a10bd2ebfe11a60dd67687533a7cfc220cc86 before d2eaea3599bcce659ce91862254dc91bcbdb6351CVE List
- Linuxaffected: 838a10bd2ebfe11a60dd67687533a7cfc220cc86 before 77515ab12e4983e6416f8c35039a3f0c0822ac70CVE List
- Linuxaffected: 6.12.6 before 6.12.114CVE List
- Linuxaffected: 6.13CVE List
- Linuxunaffected: all versions before 6.13CVE List
- Linuxunaffected: 6.12.114 through 6.12.*CVE List
- Linuxunaffected: 6.18.53 through 6.18.*CVE List
- Linuxunaffected: 7.2.7 through 7.2.*CVE List
- Linuxunaffected: 7.3CVE List
References 4
- git.kernel.org/stable/c/05757377fa0447163d07c43a119f81abe1eef8dcReferencevia CVE List
- git.kernel.org/stable/c/0e78cb242a57e481061fcb542fed4d51afba25c4Referencevia CVE List
- git.kernel.org/stable/c/d2eaea3599bcce659ce91862254dc91bcbdb6351Referencevia CVE List
- git.kernel.org/stable/c/77515ab12e4983e6416f8c35039a3f0c0822ac70Referencevia CVE List