CVE-2023-54271
NULL Pointer Dereference in Linux blk-cgroup Causes Kernel Crash
Publication date: 2025-12-30
Last updated on: 2025-12-30
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | * |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-UNKNOWN |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability is a NULL pointer dereference in the Linux kernel's blk-cgroup subsystem. It occurs because the blk-iocost policy data (blkg_policy_data) is installed before it is fully initialized. Specifically, blkcg_activate_policy() allocates policy data for all block cgroup groups (blkg) and installs them before initializing them, which can cause a race condition. If another function, ioc_weight_write(), runs concurrently and accesses uninitialized policy data, it can dereference a NULL pointer, leading to a kernel crash.
How can this vulnerability impact me? :
This vulnerability can cause the Linux kernel to crash due to a NULL pointer dereference. Such a crash can lead to system instability, denial of service, and potential data loss or corruption if the system becomes unresponsive or reboots unexpectedly.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by observing kernel crash logs indicating a NULL pointer dereference related to blk-iocost, specifically crashes showing messages like 'BUG: kernel NULL pointer dereference, address: 00000000000000e0' and call traces involving ioc_weight_write and blkcg_activate_policy. Additionally, the provided script can be used to reproduce the crash for detection purposes: #!/bin/bash echo +io > /sys/fs/cgroup/cgroup.subtree_control systemd-run --unit touch-sda --scope dd if=/dev/sda of=/dev/null bs=1M count=1 iflag=direct echo 100 > /sys/fs/cgroup/system.slice/io.weight bash -c "echo '8:0 enable=1' > /sys/fs/cgroup/io.cost.qos" & sleep .2 echo 100 > /sys/fs/cgroup/system.slice/io.weight
What immediate steps should I take to mitigate this vulnerability?
The immediate mitigation is to apply the patch that fixes the race condition by allocating, initializing, and onlining pd for each blkg while holding the blkcg lock over initialization and onlining. This ensures that an installed blkg is always fully initialized and onlined, removing the race window that causes the NULL pointer dereference crash. Until the patch is applied, avoid workloads or scripts that trigger blk-iocost operations concurrently, such as the example script provided, to reduce the chance of triggering the crash.