cve.bz

CVE-2023-54271 linux linux

no score yetEPSS 0.2%Fix available

linux linux: no CVSS score yet. EPSS 0.2% estimated probability of exploitation activity in the next 30 days.

On this page
In the Linux kernel, the following vulnerability has been resolved: blk-cgroup: Fix NULL deref caused by blkg_policy_data being installed before init blk-iocost sometimes causes the following crash: BUG: kernel NULL pointer dereference, address: 00000000000000e0 ... RIP: 0010:_raw_spin_lock+0x17/0x30 Code: be 01 02 00 00 e8 79 38 39 ff 31 d2 89 d0 5d c3 0f 1f 00 0f 1f 44 00 00 55 48 89 e5 65 ff 05 48 d0 34 7e b9 01 00 00 00 31 c0 <f0> 0f b1 0f 75 02 5d c3 89 c6 e8 ea 04 00 00 5d c3 0f 1f 84 00 00 RSP: 0018:ffffc900023b3d40 EFLAGS: 00010046 RAX: 0000000000000000 RBX: 00000000000000e0 RCX: 0000000000000001 RDX: ffffc900023b3d20 RSI: ffffc900023b3cf0 RDI: 00000000000000e0 RBP: ffffc900023b3d40 R08: ffffc900023b3c10 R09: 0000000000000003 R10: 0000000000000064 R11: 000000000000000a R12: ffff888102337000 R13: fffffffffffffff2 R14: ffff88810af408c8 R15: ffff8881070c3600 FS: 00007faaaf364fc0(0000) GS:ffff88842fdc0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000000e0 CR3: 00000001097b1000 CR4: 0000000000350ea0 Call Trace: <TASK> ioc_weight_write+0x13d/0x410 cgroup_file_write+0x7a/0x130 kernfs_fop_write_iter+0xf5/0x170 vfs_write+0x298/0x370 ksys_write+0x5f/0xb0 __x64_sys_write+0x1b/0x20 do_syscall_64+0x3d/0x80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 This happens because iocg->ioc is NULL. The field is initialized by ioc_pd_init() and never cleared. The NULL deref is caused by blkcg_activate_policy() installing blkg_policy_data before initializing it. blkcg_activate_policy() was doing the following: 1. Allocate pd's for all existing blkg's and install them in blkg->pd[]. 2. Initialize all pd's. 3. Online all pd's. blkcg_activate_policy() only grabs the queue_lock and may release and re-acquire the lock as allocation may need to sleep. ioc_weight_write() grabs blkcg->lock and iterates all its blkg's. The two can race and if ioc_weight_write() runs during #1 or between #1 and #2, it can encounter a pd which is not initialized yet, leading to crash. The crash can be reproduced with the following script: #!/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 with the following patch applied: > diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c > index fc49be622e05..38d671d5e10c 100644 > --- a/block/blk-cgroup.c > +++ b/block/blk-cgroup.c > @@ -1553,6 +1553,12 @@ int blkcg_activate_policy(struct gendisk *disk, const struct blkcg_policy *pol) > pd->online = false; > } > > + if (system_state == SYSTEM_RUNNING) { > + spin_unlock_irq(&q->queue_lock); > + ssleep(1); > + spin_lock_irq(&q->queue_lock); > + } > + > /* all allocated, init in the same order */ > if (pol->pd_init_fn) > list_for_each_entry_reverse(blkg, &q->blkg_list, q_node) I don't see a reason why all pd's should be allocated, initialized and onlined together. The only ordering requirement is that parent blkgs to be initialized and onlined before children, which is guaranteed from the walking order. Let's fix the bug by allocating, initializing and onlining pd for each blkg and holding blkcg->lock over initialization and onlining. This ensures that an installed blkg is always fully initialized and onlined removing the the race window.
EPSS
0.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 12th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

  • Linux Linux: fixed in 5.15.210
  • Linux Linux: fixed in 6.1.176
  • Linux Linux: fixed in 6.4.16
  • Linux Linux: fixed in 6.5.3
  • Linux Linux: fixed in 6.6
  • Debian, Ubuntu, Red Hat, SUSE, openSUSE, Alpaquita: fixed package versions per release

Ask an AI about this CVE

Show the promptExplain CVE-2023-54271 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2023-54271?via=ask-ai-copy and https://cve.bz/cve/CVE-2023-54271?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2023-54271 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2023-54271

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2023-54271](https://cve.bz/cve/badge/CVE-2023-54271.svg)](https://cve.bz/cve/CVE-2023-54271)

HTML:

<a href="https://cve.bz/cve/CVE-2023-54271"><img src="https://cve.bz/cve/badge/CVE-2023-54271.svg" alt="CVE-2023-54271"></a>

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Linux5.4 and later

Fixed in

ProductRelease lineFixed in
Linux5.155.15.210
Linux6.16.1.176
Linux6.46.4.16
Linux6.56.5.3
Linuxlater releases6.6

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12linux6.1.176-1DEBIAN-CVE-2023-54271
Debian13, 14linux6.5.3-1DEBIAN-CVE-2023-54271
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2023-54271
Ubuntu18.04:LTSlinux-gcp, linux-hwe, linux-oem and 12 moreno fix listedUBUNTU-CVE-2023-54271
Ubuntu20.04:LTSlinux-gke, linux-gkeop, linux-riscv and 26 moreno fix listedUBUNTU-CVE-2023-54271
Ubuntu22.04:LTSlinux5.15.0-198.208UBUNTU-CVE-2023-54271 USN-8875-1
Ubuntu22.04:LTSlinux-aws5.15.0-1117.124UBUNTU-CVE-2023-54271 USN-8875-1
Ubuntu22.04:LTSlinux-azure5.15.0-1123.132UBUNTU-CVE-2023-54271 USN-8875-1
Ubuntu22.04:LTSlinux-azure-fde5.15.0-1122.131UBUNTU-CVE-2023-54271 USN-8876-1
Ubuntu22.04:LTSlinux-gcp5.15.0-1118.128UBUNTU-CVE-2023-54271 USN-8877-1
Ubuntu22.04:LTSlinux-gke5.15.0-1113.119UBUNTU-CVE-2023-54271 USN-8875-1
Ubuntu22.04:LTSlinux-gkeop5.15.0-1100.108UBUNTU-CVE-2023-54271 USN-8875-1
Ubuntu22.04:LTSlinux-ibm5.15.0-1111.115UBUNTU-CVE-2023-54271 USN-8875-1
Ubuntu22.04:LTSlinux-intel-iotg5.15.0-1112.118UBUNTU-CVE-2023-54271 USN-8875-1
30 more for Ubuntu in the JSON and on Ubuntu's page.
Red Hatenterprise_linux:9::appstreamrv, perf, rtla and 27 more0:5.14.0-503.11.1.el9_5RHSA-2024:9315
Red Hatenterprise_linux:9::appstream, enterprise_linux:9::crb, enterprise_linux:9::nfv and 1 morebpftool-debuginfo0:7.4.0-503.11.1.el9_5RHSA-2024:9315
Red Hatenterprise_linux:9::baseosbpftool, bpftool-debuginfo0:7.4.0-503.11.1.el9_5RHSA-2024:9315
Red Hatenterprise_linux:9::baseoskernel, kernel-64k, kernel-core and 44 more0:5.14.0-503.11.1.el9_5RHSA-2024:9315
Red Hatenterprise_linux:9::crblibperf, perf-debuginfo, kernel-debuginfo and 15 more0:5.14.0-503.11.1.el9_5RHSA-2024:9315
Red Hatenterprise_linux:9::nfvkernel-rt, kernel-rt-kvm, kernel-rt-core and 20 more0:5.14.0-503.11.1.el9_5RHSA-2024:9315
Red Hatenterprise_linux:9::realtimekernel-rt, kernel-rt-core, perf-debuginfo and 18 more0:5.14.0-503.11.1.el9_5RHSA-2024:9315
SUSELinux Enterprise High Availability Extension 15 SP4, Linux Enterprise Live Patching 15 SP4, Linux Enterprise Micro 5.3 and 1 morekernel-default5.14.21-150400.24.194.1SUSE-SU-2026:0617-1
SUSELinux Enterprise High Availability Extension 15 SP6, Linux Enterprise Live Patching 15 SP6kernel-default6.4.0-150600.23.84.1SUSE-SU-2026:0293-1
SUSELinux Enterprise High Availability Extension 15 SP7, Linux Enterprise Live Patching 15 SP7, Linux Enterprise Module for Legacy 15 SP7 and 1 morekernel-default6.4.0-150700.53.28.1SUSE-SU-2026:0315-1
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSSkernel-64kb, kernel-docs, kernel-syms and 3 more5.14.21-150400.24.194.1SUSE-SU-2026:0617-1
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise Micro 5.3 and 3 morekernel-default-base5.14.21-150400.24.194.1.150400.24.98.3SUSE-SU-2026:0617-1
SUSELinux Enterprise High Performance Computing 15 SP5-ESPOS, Linux Enterprise High Performance Computing 15 SP5-LTSSkernel-64kb, kernel-docs, kernel-syms and 3 more5.14.21-150500.55.133.1SUSE-SU-2026:0317-1
SUSELinux Enterprise High Performance Computing 15 SP5-ESPOS, Linux Enterprise High Performance Computing 15 SP5-LTSS, Linux Enterprise Micro 5.5 and 2 morekernel-default-base5.14.21-150500.55.133.1.150500.6.65.1SUSE-SU-2026:0317-1
SUSELinux Enterprise Live Patching 12 SP5kernel-default4.12.14-122.290.1SUSE-SU-2026:0316-1
SUSELinux Enterprise Live Patching 12 SP5kgraft-patch-SLE12-SP5_Update_761-8.7.1SUSE-SU-2026:0316-1
SUSELinux Enterprise Live Patching 15 SP4kernel-livepatch-SLE15-SP4_Update_481-150400.9.7.1SUSE-SU-2026:0617-1
SUSELinux Enterprise Live Patching 15 SP5kernel-default5.14.21-150500.55.133.1SUSE-SU-2026:0317-1
SUSELinux Enterprise Live Patching 15 SP5kernel-livepatch-SLE15-SP5_Update_341-150500.11.3.1SUSE-SU-2026:0317-1
25 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.6dtb-aarch64, kernel-64kb, kernel-docs and 8 more6.4.0-150600.23.84.1SUSE-SU-2026:0293-1
openSUSELeap 15.6kernel-default-base6.4.0-150600.23.84.1.150600.12.38.1SUSE-SU-2026:0293-1
Alpaquita23linux-lts6.1.177-r0BELL-CVE-2023-54271
Alpaquitastreamlinux-lts6.6.58-r0BELL-CVE-2023-54271

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpaquita.

Red Hat

Red Hat rates this Moderate.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 9kernel-0:5.14.0-503.11.1.el9_5Fixed 2024-11-12RHSA-2024:9315
Red Hat Enterprise Linux 10kernelNot affected
Red Hat Enterprise Linux 6kernelOut of support scope
Red Hat Enterprise Linux 7kernelNot affected
Red Hat Enterprise Linux 7kernel-rtNot affected
Red Hat Enterprise Linux 8kernelFix deferred
Red Hat Enterprise Linux 8kernel-rtFix deferred
Red Hat Enterprise Linux 9kernel-rtFix deferred

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2023-54271.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-26-295-16Siemens SIMATIC S7-1500 TM MFP2026-10-13Critical Manufacturing, Transportation Systems, Energy, Healthcare and Public Health, Financial Services, Government Services and FacilitiesSIMATIC S7-1500 TM MFP - GNU/Linux subsystemnone listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

References

Check your stackJSON