cve.bz

CVE-2023-53538 linux linux kernel: NULL Pointer Dereference

5.5 mediumEPSS 0.2%Fix available

Medium (5.5) in linux linux kernel. 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: btrfs: insert tree mod log move in push_node_left There is a fairly unlikely race condition in tree mod log rewind that can result in a kernel panic which has the following trace: [530.569] BTRFS critical (device sda3): unable to find logical 0 length 4096 [530.585] BTRFS critical (device sda3): unable to find logical 0 length 4096 [530.602] BUG: kernel NULL pointer dereference, address: 0000000000000002 [530.618] #PF: supervisor read access in kernel mode [530.629] #PF: error_code(0x0000) - not-present page [530.641] PGD 0 P4D 0 [530.647] Oops: 0000 [#1] SMP [530.654] CPU: 30 PID: 398973 Comm: below Kdump: loaded Tainted: G S O K 5.12.0-0_fbk13_clang_7455_gb24de3bdb045 #1 [530.680] Hardware name: Quanta Mono Lake-M.2 SATA 1HY9U9Z001G/Mono Lake-M.2 SATA, BIOS F20_3A15 08/16/2017 [530.703] RIP: 0010:__btrfs_map_block+0xaa/0xd00 [530.755] RSP: 0018:ffffc9002c2f7600 EFLAGS: 00010246 [530.767] RAX: ffffffffffffffea RBX: ffff888292e41000 RCX: f2702d8b8be15100 [530.784] RDX: ffff88885fda6fb8 RSI: ffff88885fd973c8 RDI: ffff88885fd973c8 [530.800] RBP: ffff888292e410d0 R08: ffffffff82fd7fd0 R09: 00000000fffeffff [530.816] R10: ffffffff82e57fd0 R11: ffffffff82e57d70 R12: 0000000000000000 [530.832] R13: 0000000000001000 R14: 0000000000001000 R15: ffffc9002c2f76f0 [530.848] FS: 00007f38d64af000(0000) GS:ffff88885fd80000(0000) knlGS:0000000000000000 [530.866] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [530.880] CR2: 0000000000000002 CR3: 00000002b6770004 CR4: 00000000003706e0 [530.896] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [530.912] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [530.928] Call Trace: [530.934] ? btrfs_printk+0x13b/0x18c [530.943] ? btrfs_bio_counter_inc_blocked+0x3d/0x130 [530.955] btrfs_map_bio+0x75/0x330 [530.963] ? kmem_cache_alloc+0x12a/0x2d0 [530.973] ? btrfs_submit_metadata_bio+0x63/0x100 [530.984] btrfs_submit_metadata_bio+0xa4/0x100 [530.995] submit_extent_page+0x30f/0x360 [531.004] read_extent_buffer_pages+0x49e/0x6d0 [531.015] ? submit_extent_page+0x360/0x360 [531.025] btree_read_extent_buffer_pages+0x5f/0x150 [531.037] read_tree_block+0x37/0x60 [531.046] read_block_for_search+0x18b/0x410 [531.056] btrfs_search_old_slot+0x198/0x2f0 [531.066] resolve_indirect_ref+0xfe/0x6f0 [531.076] ? ulist_alloc+0x31/0x60 [531.084] ? kmem_cache_alloc_trace+0x12e/0x2b0 [531.095] find_parent_nodes+0x720/0x1830 [531.105] ? ulist_alloc+0x10/0x60 [531.113] iterate_extent_inodes+0xea/0x370 [531.123] ? btrfs_previous_extent_item+0x8f/0x110 [531.134] ? btrfs_search_path_in_tree+0x240/0x240 [531.146] iterate_inodes_from_logical+0x98/0xd0 [531.157] ? btrfs_search_path_in_tree+0x240/0x240 [531.168] btrfs_ioctl_logical_to_ino+0xd9/0x180 [531.179] btrfs_ioctl+0xe2/0x2eb0 This occurs when logical inode resolution takes a tree mod log sequence number, and then while backref walking hits a rewind on a busy node which has the following sequence of tree mod log operations (numbers filled in from a specific example, but they are somewhat arbitrary) REMOVE_WHILE_FREEING slot 532 REMOVE_WHILE_FREEING slot 531 REMOVE_WHILE_FREEING slot 530 ... REMOVE_WHILE_FREEING slot 0 REMOVE slot 455 REMOVE slot 454 REMOVE slot 453 ... REMOVE slot 0 ADD slot 455 ADD slot 454 ADD slot 453 ... ADD slot 0 MOVE src slot 0 -> dst slot 456 nritems 533 REMOVE slot 455 REMOVE slot 454 REMOVE slot 453 ... REMOVE slot 0 When this sequence gets applied via btrfs_tree_mod_log_rewind, it allocates a fresh rewind eb, and first inserts the correct key info for the 533 elements, then overwrites the first 456 of them, then decrements the count by 456 via the add ops, then rewinds the move by doing a memmove from 456:988->0:532. We have never written anything past 532, ---truncated---

Severity

CVSS 3.1

5.5 medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
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; 5th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-476 NULL Pointer Dereference
OWASP Top 10
A10:2025 Mishandling of Exceptional Conditions
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2023-53538 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2023-53538?via=ask-ai-copy and https://cve.bz/cve/CVE-2023-53538?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-53538 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.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Linux3.7 and later

Fixed in

ProductRelease lineFixed in
Linux6.16.1.189
Linux6.46.4.4
Linuxlater releases6.5

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12linux6.1.190-1DEBIAN-CVE-2023-53538
Debian13, 14linux6.4.4-1DEBIAN-CVE-2023-53538
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2023-53538
Ubuntu18.04:LTSlinux-gcp, linux-hwe, linux-oem and 12 moreno fix listedUBUNTU-CVE-2023-53538
Ubuntu20.04:LTSlinux-gke, linux-gkeop, linux-riscv and 26 moreno fix listedUBUNTU-CVE-2023-53538
Ubuntu22.04:LTSlinux, linux-aws, linux-gcp and 47 moreno fix listedUBUNTU-CVE-2023-53538
Ubuntu24.04:LTSlinux-intel, linux-riscv, linux-oem-6.8 and 7 moreno fix listedUBUNTU-CVE-2023-53538
UbuntuNvidia-BlueField:22.04:LTSlinux-bluefieldno fix listedUBUNTU-CVE-2023-53538
UbuntuPro:14.04:LTSlinux, linux-aws, linux-azure and 1 moreno fix listedUBUNTU-CVE-2023-53538
UbuntuPro:16.04:LTSlinux, linux-aws, linux-gcp and 5 moreno fix listedUBUNTU-CVE-2023-53538
UbuntuPro:18.04:LTSlinux, linux-aws, linux-kvm and 10 moreno fix listedUBUNTU-CVE-2023-53538
UbuntuPro:20.04:LTSlinux, linux-aws, linux-gcp and 19 moreno fix listedUBUNTU-CVE-2023-53538
UbuntuPro:FIPS-preview:22.04:LTS, Pro:FIPS-updates:18.04:LTS, Pro:FIPS-updates:20.04:LTS and 3 morelinux-fips, linux-aws-fips, linux-gcp-fips and 1 moreno fix listedUBUNTU-CVE-2023-53538
UbuntuPro:FIPS-updates:16.04:LTS, Pro:FIPS:16.04:LTSlinux-fipsno fix listedUBUNTU-CVE-2023-53538
1 more for Ubuntu in the JSON and on Ubuntu's page.
SUSELinux Enterprise High Availability Extension 15 SP6, Linux Enterprise Live Patching 15 SP6, Linux Enterprise Module for Legacy 15 SP6 and 1 morekernel-default6.4.0-150600.23.78.1SUSE-SU-2025:4140-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.22.1SUSE-SU-2025:4057-1
SUSELinux Enterprise Live Patching 15 SP6kernel-livepatch-SLE15-SP6-RT_Update_171-150600.1.3.1SUSE-SU-2025:4301-1
SUSELinux Enterprise Live Patching 15 SP6kernel-livepatch-SLE15-SP6_Update_171-150600.13.5.1SUSE-SU-2025:4140-1
SUSELinux Enterprise Live Patching 15 SP7kernel-livepatch-SLE15-SP7-RT_Update_61-150700.1.3.1SUSE-SU-2025:4141-1
SUSELinux Enterprise Live Patching 15 SP7kernel-livepatch-SLE15-SP7_Update_61-150700.15.3.1SUSE-SU-2025:4057-1
SUSELinux Enterprise Module for Basesystem 15 SP6kernel-64kb, kernel-source, kernel-default and 1 more6.4.0-150600.23.78.1SUSE-SU-2025:4140-1
SUSELinux Enterprise Module for Basesystem 15 SP6kernel-default-base6.4.0-150600.23.78.1.150600.12.34.2SUSE-SU-2025:4140-1
SUSELinux Enterprise Module for Basesystem 15 SP7kernel-64kb, kernel-source, kernel-default and 1 more6.4.0-150700.53.22.1SUSE-SU-2025:4057-1
SUSELinux Enterprise Module for Basesystem 15 SP7kernel-default-base6.4.0-150700.53.22.1.150700.17.15.1SUSE-SU-2025:4057-1
SUSELinux Enterprise Module for Development Tools 15 SP6kernel-docs, kernel-syms, kernel-source and 1 more6.4.0-150600.23.78.1SUSE-SU-2025:4140-1
SUSELinux Enterprise Module for Development Tools 15 SP7kernel-docs, kernel-syms, kernel-source and 1 more6.4.0-150700.53.22.1SUSE-SU-2025:4057-1
10 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.78.1SUSE-SU-2025:4140-1
openSUSELeap 15.6kernel-azure, kernel-syms-azure, kernel-source-azure6.4.0-150600.8.55.1SUSE-SU-2025:4128-1
openSUSELeap 15.6kernel-default-base6.4.0-150600.23.78.1.150600.12.34.2SUSE-SU-2025:4140-1
openSUSELeap 15.6kernel-rt, kernel-syms-rt, kernel-rt_debug and 1 more6.4.0-150600.10.58.1SUSE-SU-2025:4301-1
Azure Linux2kernelno fix listedAZL-77393
Alpaquita23linux-lts6.1.189-r0BELL-CVE-2023-53538
Alpaquitastreamlinux-lts6.6.58-r0BELL-CVE-2023-53538

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

Red Hat

Red Hat rates this Low.

Red Hat's statement

Btrfs maintains a tree modification log to support historical tree queries, which are used by features like logical inode resolution and backref walking. When internal B-tree nodes need rebalancing, the filesystem may shift elements between sibling nodes through operations like balance_node_right and push_node_left. These operations should log their modifications so the tree can be rewound to earlier states. However, there's a subtle interaction: balance_node_right logs a MOVE operation, then push_node_left copies elements and shifts others—but deliberately skips logging the second move to avoid double-logging the copied elements. Unfortunately, this leaves out a critical move operation. When the tree mod log gets replayed (rewound), it reconstructs the historical tree state by reversing logged operations. The missing move operation causes the replay to memmove data from never-initialized memory regions, filling slots with garbage, often all zeros. If a search then uses one of these corrupted slots, it tries to read extent buffers at bogus addresses like offset 0, triggering panics in the extent mapping code. This race is quite rare and depends on specific timing during concurrent tree operations.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10kernelNot affected
Red Hat Enterprise Linux 6kernelOut of support scope
Red Hat Enterprise Linux 7kernelFix deferred
Red Hat Enterprise Linux 7kernel-rtFix deferred
Red Hat Enterprise Linux 8kernelNot affected
Red Hat Enterprise Linux 8kernel-rtNot affected
Red Hat Enterprise Linux 9kernelNot affected
Red Hat Enterprise Linux 9kernel-rtNot affected

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-53538.

References

Check your stackJSON