In the Linux kernel, the following vulnerability has been resolved:
tracing: Fix NULL pointer dereference in func_set_flag()
func_set_flag() dereferences tr->current_trace_flags before verifying that the current tracer is actually the function tracer. When the active tracer has been switched away from "function" (e.g., to "wakeup_rt"), tr->current_trace_flags can be NULL, leading to a NULL pointer dereference and kernel crash.
The call chain that triggers this is:
trace_options_write() -> __set_tracer_option() -> trace->set_flag() /* func_set_flag */
In func_set_flag(), the first operation is:
if (!!set == !!(tr->current_trace_flags->val & bit))
This dereferences tr->current_trace_flags unconditionally. The safety check that guards against a non-function tracer:
if (tr->current_trace != &function_trace) return 0;
is placed *after* the dereference, which is too late.
This was observed with the following crash dump:
BUG: unable to handle page fault at 0000000000000000 RIP: func_set_flag+0xd
Call Trace: __set_tracer_option+0x27 trace_options_write+0x75 vfs_write+0x12a ksys_write+0x66 do_syscall_64+0x5b
RIP: ffffffff914c973d RSP: ff67ec88b01dfdf0 RFLAGS: 00010202 RAX: 0000000000000000 RBX: ff3a826e80354580 RCX: 0000000000000001 RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffffffff93918080
The disassembly confirms the fault:
func_set_flag+0: mov 0x1f08(%rdi), %rax ; RAX = tr->current_trace_flags = NULL func_set_flag+13: mov (%rax), %eax ; page fault: dereference NULL
At the time of the crash: tr->current_trace_flags = 0x0 (NULL) tr->current_trace = wakeup_rt_tracer (not function_trace)
The scenario is that a process opens a function tracer option file (such as "func_stack_trace"), then the current tracer is switched to another tracer (e.g., "wakeup_rt"), which sets current_trace_flags to NULL. When the process subsequently writes to the option file, func_set_flag() is invoked and crashes on the NULL dereference.
Fix this by moving the current_trace check before the current_trace_flags dereference, so that func_set_flag() returns early when the function tracer is not active.
CVSS Details
- CVSS 3.1 Base Score: 5.5
- CVSS 3.1 Vector: (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H)
Covered by Rapid7
| Product | Vendor Advisory | Solution File | Added | Published |
|---|---|---|---|---|
| Ubuntu | — | Upgrade linux-image-generic-64k-hwe-26.04Upgrade linux-image-generic-7.0Upgrade linux-image-7.0.0-1012-aws-64kUpgrade linux-image-awsUpgrade linux-image-raspi-7.0Upgrade linux-image-gcp-7.0Upgrade linux-image-gke-7.0Upgrade linux-image-gke-64kUpgrade linux-image-nvidia-7.0Upgrade linux-image-aws-64k-7.0Upgrade linux-image-virtual-hwe-26.04Upgrade linux-image-7.0.0-1011-gcp-64kUpgrade linux-image-7.0.0-1018-nvidia-64kUpgrade linux-image-realtime-64kUpgrade linux-image-nvidia-bosUpgrade linux-image-7.0.0-1018-nvidiaUpgrade linux-image-gcp-64k-7.0Upgrade linux-image-7.0.0-2018-nvidia-bos-64kUpgrade linux-image-generic-64k-hwe-24.04Upgrade linux-image-nvidia-64k-7.0Upgrade linux-image-oem-26.04Upgrade linux-image-aws-7.0Upgrade linux-image-7.0.0-31-realtimeUpgrade linux-image-raspi-realtime-7.0Upgrade linux-image-7.0.0-1006-gkeUpgrade linux-image-gke-64k-7.0Upgrade linux-image-7.0.0-1012-awsUpgrade linux-image-realtime-7.0Upgrade linux-image-ibmUpgrade linux-image-nvidia-bos-64k-7.0Upgrade linux-image-raspiUpgrade linux-image-oem-26.04aUpgrade linux-image-gcp-64kUpgrade linux-image-7.0.0-1019-raspi-realtimeUpgrade linux-image-7.0.0-31-realtime-64kUpgrade linux-image-7.0.0-1013-ibmUpgrade linux-image-nvidia-bos-64kUpgrade linux-image-7.0.0-1019-raspiUpgrade linux-image-realtimeUpgrade linux-image-ibm-7.0Upgrade linux-image-realtime-hwe-26.04Upgrade linux-image-7.0.0-1006-gke-64kUpgrade linux-image-realtime-64k-hwe-26.04Upgrade linux-image-nvidia-bos-7.0Upgrade linux-image-virtual-7.0Upgrade linux-image-nvidia-64kUpgrade linux-image-virtual-hwe-24.04Upgrade linux-image-gcpUpgrade linux-image-7.0.0-31-genericUpgrade linux-image-nvidiaUpgrade linux-image-7.0.0-2018-nvidia-bosUpgrade linux-image-gke-hwe-26.04Upgrade linux-image-virtualUpgrade linux-image-raspi-realtimeUpgrade linux-image-nvidia-64k-hwe-26.04Upgrade linux-image-realtime-64k-7.0Upgrade linux-image-oem-7.0Upgrade linux-image-gkeUpgrade linux-image-generic-64k-7.0Upgrade linux-image-7.0.0-31-generic-64kUpgrade linux-image-aws-64kUpgrade linux-image-7.0.0-1013-oemUpgrade linux-image-generic-hwe-26.04Upgrade linux-image-7.0.0-1011-gcpUpgrade linux-image-oem-26.04bUpgrade linux-image-genericUpgrade linux-image-generic-hwe-24.04Upgrade linux-image-nvidia-hwe-26.04Upgrade linux-image-gke-64k-hwe-26.04Upgrade linux-image-generic-64k | Sep 14, 2026 | Sep 7, 2026 |
Prioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub