CVE-2024-49850

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-49850
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-49850.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-49850
Downstream
Related
Published
2024-10-21T13:15:05Z
Modified
2025-08-09T19:01:29Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
[none]
Details

In the Linux kernel, the following vulnerability has been resolved:

bpf: correctly handle malformed BPFCORETYPEIDLOCAL relos

In case of malformed relocation record of kind BPFCORETYPEIDLOCAL referencing a non-existing BTF type, function bpfcorecalcreloinsn would cause a null pointer deference.

Fix this by adding a proper check upper in call stack, as malformed relocation records could be passed from user space.

Simplest reproducer is a program:

r0 = 0
exit

With a single relocation record:

.insn_off = 0,          /* patch first instruction */
.type_id = 100500,      /* this type id does not exist */
.access_str_off = 6,    /* offset of string "0" */
.kind = BPF_CORE_TYPE_ID_LOCAL,

See the link for original reproducer or next commit for a test case.

References

Affected packages