CVE-2024-36481: tracing/probes: fix error check in parse_btf_field()
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
tracing/probes: fix error check in parse_btf_field()
btf_find_struct_member() might return NULL or an error via the ERR_PTR() macro. However, its caller in parse_btf_field() only checks for the NULL condition. Fix this by using IS_ERR() and returning the error up the stack.
The Linux kernel CVE team has assigned CVE-2024-36481 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.6 with commit c440adfbe302 and fixed in 6.6.33 with commit ad4b202da2c4 Issue introduced in 6.6 with commit c440adfbe302 and fixed in 6.9.4 with commit 4ed468edfeb5 Issue introduced in 6.6 with commit c440adfbe302 and fixed in 6.10-rc2 with commit e569eb349702
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2024-36481
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
kernel/trace/trace_probe.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/ad4b202da2c498fefb69e5d87f67b946e7fe1e6a https://git.kernel.org/stable/c/4ed468edfeb54c7202e559eba74c25fac6a0dad0 https://git.kernel.org/stable/c/e569eb34970281438e2b48a3ef11c87459fcfbcb