Cloudanix VulnDB

CVE-2024-49926

Medium · 5.5

CVSS

5.5

EPSS

0.2%

Published

Oct 21, 2024

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A configuration setting in the Linux kernel can cause the system to crash unexpectedly during routine internal operations.

Exploitation
Other
Attacker needs
None
Complexity
Theoretical
Impact
Denial Of Service
Component
OS kernel
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Invalid memory access to a non-existent percpu rtpcp variable in rcu_tasks_need_gpcb() when CONFIG_FORCE_NR_CPUS=y sets nr_cpu_ids to NR_CPUS instead of actual possible CPUs, resulting in page fault and kernel panic.

Why it matters to the business

Systems built with high NR_CPUS values experience unexpected kernel panics and crashes during RCU tasks operation, causing unplanned downtime and requiring reboots on affected Linux deployments.

How an attack unfolds

The condition is triggered internally by RCU tasks kthread on boot or during operation on misconfigured kernels; no remote attacker interaction is required, though listed threat actors have shown interest in similar Linux kernel memory issues.

How to fix it

Update Linux kernel to commit b3b2431ed27f4ebc28e26cdf005c1de42dc60bdf or later; rebuild with corrected maximum CPU number handling for enqueue/dequeue limits; apply vendor patches for affected distributions.

How to confirm the fix worked

Verify kernel source contains the fix commit; confirm nr_cpu_ids usage replaced by maximum possible CPU count in rcu_tasks_need_gpcb(); test boot on CONFIG_FORCE_NR_CPUS=y builds without panic.

Typical attack path

  1. Kernel boots with CONFIG_FORCE_NR_CPUS=y and NR_CPUS exceeding actual CPUs
  2. rcu_tasks_kthread invokes rcu_tasks_need_gpcb()
  3. Function indexes into percpu array using nr_cpu_ids exceeding valid range
  4. Page fault occurs on non-existent percpu address
  5. Kernel oops and panic terminate the system

How to detect it

Search kernel logs and dmesg for oops involving rcu_tasks_need_gpcb, page_fault_oops on percpu addresses, and call traces containing rcu_tasks_one_gp or rcu_tasks_kthread; check for tainted kernel messages with G W flags around CPU setup.

  • rcu_tasks_need_gpcb+0x25d/0x2c0
  • BUG: unable to handle page fault for address: ffffffff9911c8c8
  • rcu_tasks_trace Tainted: G W
  • smpboot: Allowing .* CPUs, .* hotplug CPUs
  • setup_percpu: NR_CPUS:512 nr_cpumask_bits:512 nr_cpu_ids:512

What your security team should do

  • Prioritize kernel upgrade on all systems using CONFIG_FORCE_NR_CPUS=y
  • Review kernel configs for NR_CPUS values exceeding hardware CPU count
  • Monitor for related panics in production kernels built after 2024-10-21
  • Apply fixed versions for dependent packages such as libserf and utf8proc where listed

The record

In the Linux kernel, the following vulnerability has been resolved: rcu-tasks: Fix access non-existent percpu rtpcp variable in rcu_tasks_need_gpcb() For kernels built with CONFIG_FORCE_NR_CPUS=y, the nr_cpu_ids is defined as NR_CPUS instead of the number of possible cpus, this will cause the following system panic: smpboot: Allowing 4 CPUs, 0 hotplug CPUs ... setup_percpu: NR_CPUS:512 nr_cpumask_bits:512 nr_cpu_ids:512 nr_node_ids:1 ... BUG: unable to handle page fault for address: ffffffff9911c8c8 Oops: 0000 [#1] PREEMPT SMP PTI CPU: 0 PID: 15 Comm: rcu_tasks_trace Tainted: G W 6.6.21 #1 5dc7acf91a5e8e9ac9dcfc35bee0245691283ea6 RIP: 0010:rcu_tasks_need_gpcb+0x25d/0x2c0 RSP: 0018:ffffa371c00a3e60 EFLAGS: 00010082 CR2: ffffffff9911c8c8 CR3: 000000040fa20005 CR4: 00000000001706f0 Call Trace: <TASK> ? __die+0x23/0x80 ? page_fault_oops+0xa4/0x180 ? exc_page_fault+0x152/0x180 ? asm_exc_page_fault+0x26/0x40 ? rcu_tasks_need_gpcb+0x25d/0x2c0 ? __pfx_rcu_tasks_kthread+0x40/0x40 rcu_tasks_one_gp+0x69/0x180 rcu_tasks_kthread+0x94/0xc0 kthread+0xe8/0x140 ? __pfx_kthread+0x40/0x40 ret_from_fork+0x34/0x80 ? __pfx_kthread+0x40/0x40 ret_from_fork_asm+0x1b/0x80 </TASK> Considering that there may be holes in the CPU numbers, use the maximum possible cpu number, instead of nr_cpu_ids, for configuring enqueue and dequeue limits. [ neeraj.upadhyay: Fix htmldocs build error reported by Stephen Rothwell ]

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 linux 0 No fix
Debian:12 linux 0 No fix
Debian:13 linux 0 No fix
Debian:13 linux 0 6.11.4-1
Linux Kernel 0 6.6.60
Linux Kernel 5.17.0 6.6.60
Ubuntu:24.10 linux 0 6.11.0-18.18
Ubuntu:24.10 linux-aws 0 6.11.0-1009.10
Ubuntu:24.10 linux-azure 0 6.11.0-1009.9
Ubuntu:24.10 linux-gcp 0 6.11.0-1009.9
Ubuntu:24.10 linux-lowlatency 0 6.11.0-1010.11
Ubuntu:24.10 linux-oracle 0 6.11.0-1011.12
Ubuntu:24.10 linux-raspi 0 6.11.0-1008.8
Ubuntu:24.10 linux-realtime 0 6.11.0-1005.5
openSUSE:Tumbleweed kernel-source 0 6.11.8-1.1
openSUSE:Tumbleweed kernel-source-longterm 0 6.12.11-1.1

Related vulnerabilities