VDB

CVE-2025-40178

CVE-2025-40178 PUBLISHED

pid: Add a judgment for ns null in pid_nr_ns

Reported by linux · Published November 12, 2025

In the Linux kernel, the following vulnerability has been resolved: pid: Add a judgment for ns null in pid_nr_ns __task_pid_nr_ns ns = task_active_pid_ns(current); pid_nr_ns(rcu_dereference(*task_pid_ptr(task, type)), ns); if (pid && ns->level <= pid->level) { Sometimes null is returned for task_active_pid_ns. Then it will trigger kernel panic in pid_nr_ns. For example: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000058 Mem abort info: ESR = 0x0000000096000007 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x07: level 3 translation fault Data abort info: ISV = 0, ISS = 0x00000007, ISS2 = 0x00000000 CM = 0, WnR = 0, TnD = 0, TagAccess = 0 GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 user pgtable: 4k pages, 39-bit VAs, pgdp=00000002175aa000 [0000000000000058] pgd=08000002175ab003, p4d=08000002175ab003, pud=08000002175ab003, pmd=08000002175be003, pte=0000000000000000 pstate: 834000c5 (Nzcv daIF +PAN -UAO +TCO +DIT -SSBS BTYPE=--) pc : __task_pid_nr_ns+0x74/0xd0 lr : __task_pid_nr_ns+0x24/0xd0 sp : ffffffc08001bd10 x29: ffffffc08001bd10 x28: ffffffd4422b2000 x27: 0000000000000001 x26: ffffffd442821168 x25: ffffffd442821000 x24: 00000f89492eab31 x23: 00000000000000c0 x22: ffffff806f5693c0 x21: ffffff806f5693c0 x20: 0000000000000001 x19: 0000000000000000 x18: 0000000000000000 x17: 00000000529c6ef0 x16: 00000000529c6ef0 x15: 00000000023a1adc x14: 0000000000000003 x13: 00000000007ef6d8 x12: 001167c391c78800 x11: 00ffffffffffffff x10: 0000000000000000 x9 : 0000000000000001 x8 : ffffff80816fa3c0 x7 : 0000000000000000 x6 : 49534d702d535449 x5 : ffffffc080c4c2c0 x4 : ffffffd43ee128c8 x3 : ffffffd43ee124dc x2 : 0000000000000000 x1 : 0000000000000001 x0 : ffffff806f5693c0 Call trace: __task_pid_nr_ns+0x74/0xd0 ... __handle_irq_event_percpu+0xd4/0x284 handle_irq_event+0x48/0xb0 handle_fasteoi_irq+0x160/0x2d8 generic_handle_domain_irq+0x44/0x60 gic_handle_irq+0x4c/0x114 call_on_irq_stack+0x3c/0x74 do_interrupt_handler+0x4c/0x84 el1_interrupt+0x34/0x58 el1h_64_irq_handler+0x18/0x24 el1h_64_irq+0x68/0x6c account_kernel_stack+0x60/0x144 exit_task_stack_account+0x1c/0x80 do_exit+0x7e4/0xaf8 ... get_signal+0x7bc/0x8d8 do_notify_resume+0x128/0x828 el0_svc+0x6c/0x70 el0t_64_sync_handler+0x68/0xbc el0t_64_sync+0x1a8/0x1ac Code: 35fffe54 911a02a8 f9400108 b4000128 (b9405a69) ---[ end trace 0000000000000000 ]--- Kernel panic - not syncing: Oops: Fatal exception in interrupt

EPSS 0.22% · 13.2th percentile

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
kernel6.12-develAmazon Linux1:6.12.55-74.119.amzn2023
kernelAmazon Linux1:6.1.158-178.288.amzn2023
kernel6.12-libbpf-staticAmazon Linux1:6.12.55-74.119.amzn2023
bpftool6.12Amazon Linux1:6.12.55-74.119.amzn2023
kernel-headersAmazon Linux1:6.1.158-178.288.amzn2023
python3-perfAmazon Linux1:6.1.158-178.288.amzn2023
kernel6.12-headersAmazon Linux1:6.12.55-74.119.amzn2023
kernel6.12-modules-extraAmazon Linux1:6.12.55-74.119.amzn2023
kernel6.12-libbpfAmazon Linux1:6.12.55-74.119.amzn2023
kernel-livepatch-6.1.158-178.288Amazon Linux1:1.0-0.amzn2023

Risk scores

EPSS Score
0.22%
13.2th percentile

Affected products

VendorProductVersions
LinuxLinux17cf22c33e1f1b5e435469c84e43872579497653, 17cf22c33e1f1b5e435469c84e43872579497653, 17cf22c33e1f1b5e435469c84e43872579497653
LinuxLinux3.8, 0, 5.4.301
amazon:2023kernel6.12-devel0
amazon:2023kernel0
amazon:2023kernel6.12-libbpf-static0
amazon:2023bpftool6.120
amazon:2023kernel-headers0
amazon:2023python3-perf0
amazon:2023kernel6.12-headers0
amazon:2023kernel6.12-modules-extra0
amazon:2023kernel6.12-libbpf0
amazon:2023kernel-livepatch-6.1.158-178.2880
linuxlinux_kernel3.8, 3.8, 3.8
LinuxLinux17cf22c33e1f1b5e435469c84e43872579497653, 17cf22c33e1f1b5e435469c84e43872579497653, 17cf22c33e1f1b5e435469c84e43872579497653
amazon:2023kernel-modules-extra0
amazon:2023bpftool0
amazon:2023perf0
amazon:2023kernel-libbpf-devel0
amazon:2023kernel-livepatch-6.12.55-74.1190
amazon:2023kernel-tools0

…and 12 more

Timeline

  • Nov 10, 2025 CVE Published
  • Nov 12, 2025 Coalition ESS Score (4 in total, the first dated here)
  • Nov 13, 2025 EPSS Score (30 in total, the first dated here)
  • Dec 15, 2025 Security Advisory (135 in total, the first dated here)
  • Mar 29, 2026 Distribution Patch (118 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2025-40178
vulnetix vdb fixes CVE-2025-40178

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-40178/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›