CVE-2024-57930

Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
21/01/2025
Last modified:
21/01/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> tracing: Have process_string() also allow arrays<br /> <br /> In order to catch a common bug where a TRACE_EVENT() TP_fast_assign()<br /> assigns an address of an allocated string to the ring buffer and then<br /> references it in TP_printk(), which can be executed hours later when the<br /> string is free, the function test_event_printk() runs on all events as<br /> they are registered to make sure there&amp;#39;s no unwanted dereferencing.<br /> <br /> It calls process_string() to handle cases in TP_printk() format that has<br /> "%s". It returns whether or not the string is safe. But it can have some<br /> false positives.<br /> <br /> For instance, xe_bo_move() has:<br /> <br /> TP_printk("move_lacks_source:%s, migrate object %p [size %zu] from %s to %s device_id:%s",<br /> __entry-&gt;move_lacks_source ? "yes" : "no", __entry-&gt;bo, __entry-&gt;size,<br /> xe_mem_type_to_name[__entry-&gt;old_placement],<br /> xe_mem_type_to_name[__entry-&gt;new_placement], __get_str(device_id))<br /> <br /> Where the "%s" references into xe_mem_type_to_name[]. This is an array of<br /> pointers that should be safe for the event to access. Instead of flagging<br /> this as a bad reference, if a reference points to an array, where the<br /> record field is the index, consider it safe.

Impact