Vulnerability · Published Nov 12, 2025 · Assigned by Linux
CVE-2025-40178pid: Add a judgment for ns null in pid_nr_ns
Unrated
In plain English
A security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 13% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.158-1 | DEBIAN-CVE-2025-40178 |
| Debian:13 | linux | 6.12.57-1 | DEBIAN-CVE-2025-40178 |
| Debian:14 | linux | 6.17.6-1 | DEBIAN-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux | 5.15.0-170.180 | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux | 6.8.0-106.106 | UBUNTU-CVE-2025-40178 |
| Ubuntu:25.10 | linux | 6.17.0-14.14 | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1100.107 | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1050.53 | UBUNTU-CVE-2025-40178 |
| Ubuntu:25.10 | linux-aws | 6.17.0-1007.7 | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-aws-6.14 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-aws-6.17 | 6.17.0-1007.7~24.04.1 | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1050.53~22.04.1 | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1109.118 | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1051.57 | UBUNTU-CVE-2025-40178 |
| Ubuntu:25.10 | linux-azure | 6.17.0-1008.8 | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-azure-6.14 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1051.57~22.04.1 | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1109.118.1 | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-azure-fde | 6.8.0-1058.65 | UBUNTU-CVE-2025-40178 |
| Ubuntu:25.10 | linux-azure-fde | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-azure-fde-6.14 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.8 | 6.8.0-1058.65~22.04.1 | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-azure-nvidia-6.14 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1100.109 | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1052.55 | UBUNTU-CVE-2025-40178 |
| Ubuntu:25.10 | linux-gcp | 6.17.0-1007.7 | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-gcp-6.14 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-gcp-6.17 | 6.17.0-1008.8~24.04.1 | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1052.55~22.04.1 | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1096.102 | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1048.53 | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1083.91 | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1035.38 | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-hwe-6.11 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-hwe-6.14 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-106.106~22.04.1 | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1094.97 | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1049.49 | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1049.49~22.04.1 | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1095.101 | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1092.97 | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-170.180 | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-106.106.1 | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-lowlatency-hwe-6.11 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-106.106.1~22.04.1 | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1095.96 | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1049.52 | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-nvidia-6.17 | 6.17.0-1008.8 | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1049.52~22.04.1 | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1049.52.1 | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1052.52 | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | 6.8.0-1020.20 | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1041.41 | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-oem-6.14 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-oem-6.17 | 6.17.0-1011.11 | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1097.103 | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1047.48 | UBUNTU-CVE-2025-40178 |
| Ubuntu:25.10 | linux-oracle | 6.17.0-1007.7 | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-oracle-6.14 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-oracle-6.17 | 6.17.0-1007.7~24.04.1 | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1047.48~22.04.1 | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1097.100 | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1050.54 | UBUNTU-CVE-2025-40178 |
| Ubuntu:25.10 | linux-raspi | 6.17.0-1008.8 | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:25.10 | linux-realtime | 6.17.0-1006.7 | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:25.10 | linux-riscv | 6.17.0-14.14.1 | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-riscv-6.14 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-106.106~22.04.1 | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2025-40178 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1028.29 | UBUNTU-CVE-2025-40178 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1064.68 | UBUNTU-CVE-2025-40178 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 17cf22c33e1f1b5e435469c84e43872579497653 – before 75dbc029c5359438be4a6f908bfbfdab969af77617cf22c33e1f1b5e435469c84e43872579497653 – before c2d09d724856b6f82ab688f65fc1ce833bb5633317cf22c33e1f1b5e435469c84e43872579497653 – before c3b654021931dc806ba086c549e8756c3f204a6717cf22c33e1f1b5e435469c84e43872579497653 – before e10c36a771c5cc910abd9fe4aa9033ee32a47c3817cf22c33e1f1b5e435469c84e43872579497653 – before 09d227c59d97efda7d5cc878a4335a6b2bb224c217cf22c33e1f1b5e435469c84e43872579497653 – before 2076b916bf41be48799d1443df0f8fc75d12ccd017cf22c33e1f1b5e435469c84e43872579497653 – before a0212978af1825b37da0b453b94d9b0e5af1147817cf22c33e1f1b5e435469c84e43872579497653 – before 006568ab4c5ca2309ceb36fa553e390b4aa9c0c7 |
| Linux | Linux | 3.8 |
References
- https://git.kernel.org/stable/c/75dbc029c5359438be4a6f908bfbfdab969af776
- https://git.kernel.org/stable/c/c2d09d724856b6f82ab688f65fc1ce833bb56333
- https://git.kernel.org/stable/c/c3b654021931dc806ba086c549e8756c3f204a67
- https://git.kernel.org/stable/c/e10c36a771c5cc910abd9fe4aa9033ee32a47c38
- https://git.kernel.org/stable/c/09d227c59d97efda7d5cc878a4335a6b2bb224c2
- https://git.kernel.org/stable/c/2076b916bf41be48799d1443df0f8fc75d12ccd0
- https://git.kernel.org/stable/c/a0212978af1825b37da0b453b94d9b0e5af11478
- https://git.kernel.org/stable/c/006568ab4c5ca2309ceb36fa553e390b4aa9c0c7