{"answers":{"affected":"It affects 1 product.","exploited":"There is no known exploitation of CVE-2023-52896 in the wild and no public exploit code.","fix":"Apply the vendor's patch.","what":"CVE-2023-52896 is a medium-severity vulnerability in Linux kernel, published on 21 Aug 2024. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2023-52896 and fix it if it is affected.\n\nWhat it is: CVE-2023-52896 is a medium-severity vulnerability in Linux kernel, published on 21 Aug 2024. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2023-52896 in the wild and no public exploit code.\n\nAffected product: Linux kernel. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2023-52896/ (Markdown: https://insights.sbomify.com/CVE-2023-52896/index.md)","id":"CVE-2023-52896","markdown":"https://insights.sbomify.com/CVE-2023-52896/index.md","name":"CVE-2023-52896","record":{"aliases":["BELL-CVE-2023-52896","DEBIAN-CVE-2023-52896","GHSA-7g59-fcf3-5hj5","UBUNTU-CVE-2023-52896"],"analysis":{"component_type":"kernel","fix_type":"patch","impacts":["denial_of_service"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Linux kernel btrfs","requires_auth":"low_privilege","summary":"A race condition in the Linux kernel's btrfs filesystem can cause a NULL pointer dereference, leading to a system crash.","user_interaction":"not_required","vuln_class":"null_dereference"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"Linux","cpe":[{"product":"linux_kernel","vendor":"linux"}],"cvss":{"score":4.7,"severity":"medium","source":"nvd","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","version":"3.1"},"cwes":[{"id":"CWE-476","name":"NULL Pointer Dereference"}],"description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: fix race between quota rescan and disable leading to NULL pointer deref\n\nIf we have one task trying to start the quota rescan worker while another\none is trying to disable quotas, we can end up hitting a race that results\nin the quota rescan worker doing a NULL pointer dereference. The steps for\nthis are the following:\n\n1) Quotas are enabled;\n\n2) Task A calls the quota rescan ioctl and enters btrfs_qgroup_rescan().\n   It calls qgroup_rescan_init() which returns 0 (success) and then joins a\n   transaction and commits it;\n\n3) Task B calls the quota disable ioctl and enters btrfs_quota_disable().\n   It clears the bit BTRFS_FS_QUOTA_ENABLED from fs_info-\u003eflags and calls\n   btrfs_qgroup_wait_for_completion(), which returns immediately since the\n   rescan worker is not yet running.\n   Then it starts a transaction and locks fs_info-\u003eqgroup_ioctl_lock;\n\n4) Task A queues the rescan worker, by calling btrfs_queue_work();\n\n5) The rescan worker starts, and calls rescan_should_stop() at the start\n   of its while loop, which results in 0 iterations of the loop, since\n   the flag BTRFS_FS_QUOTA_ENABLED was cleared from fs_info-\u003eflags by\n   task B at step 3);\n\n6) Task B sets fs_info-\u003equota_root to NULL;\n\n7) The rescan worker tries to start a transaction and uses\n   fs_info-\u003equota_root as the root argument for btrfs_start_transaction().\n   This results in a NULL pointer dereference down the call chain of\n   btrfs_start_transaction(). The stack trace is something like the one\n   reported in Link tag below:\n\n   general protection fault, probably for non-canonical address 0xdffffc0000000041: 0000 [#1] PREEMPT SMP KASAN\n   KASAN: null-ptr-deref in range [0x0000000000000208-0x000000000000020f]\n   CPU: 1 PID: 34 Comm: kworker/u4:2 Not tainted 6.1.0-syzkaller-13872-gb6bb9676f216 #0\n   Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022\n   Workqueue: btrfs-qgroup-rescan btrfs_work_helper\n   RIP: 0010:start_transaction+0x48/0x10f0 fs/btrfs/transaction.c:564\n   Code: 48 89 fb 48 (...)\n   RSP: 0018:ffffc90000ab7ab0 EFLAGS: 00010206\n   RAX: 0000000000000041 RBX: 0000000000000208 RCX: ffff88801779ba80\n   RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000\n   RBP: dffffc0000000000 R08: 0000000000000001 R09: fffff52000156f5d\n   R10: fffff52000156f5d R11: 1ffff92000156f5c R12: 0000000000000000\n   R13: 0000000000000001 R14: 0000000000000001 R15: 0000000000000003\n   FS:  0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000\n   CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033\n   CR2: 00007f2bea75b718 CR3: 000000001d0cc000 CR4: 00000000003506e0\n   DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000\n   DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400\n   Call Trace:\n    \u003cTASK\u003e\n    btrfs_qgroup_rescan_worker+0x3bb/0x6a0 fs/btrfs/qgroup.c:3402\n    btrfs_work_helper+0x312/0x850 fs/btrfs/async-thread.c:280\n    process_one_work+0x877/0xdb0 kernel/workqueue.c:2289\n    worker_thread+0xb14/0x1330 kernel/workqueue.c:2436\n    kthread+0x266/0x300 kernel/kthread.c:376\n    ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308\n    \u003c/TASK\u003e\n   Modules linked in:\n\nSo fix this by having the rescan worker function not attempt to start a\ntransaction if it didn't do any rescan work.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"btrfs: fix race between quota rescan and disable leading to NULL pointer deref","id":"CVE-2023-52896","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":"linux:linux_kernel","products":["linux:linux_kernel"],"type":"null_dereference","year":"2023"},"n_packages":0,"n_references":5,"next":{"headline":"btrfs: qgroup: do not warn on record without old_roots populated","id":"CVE-2023-52897"},"packages":[],"prev":{"headline":"io_uring/poll: don't reissue in case of poll race on multishot request","id":"CVE-2023-52895"},"products":["Linux"],"published":"2024-08-21","related":[{"cvss_score":8.8,"headline":"Linux Kernel Out-of-Bounds Write","id":"CVE-2026-53266","kev_date_added":"2026-09-18","published":"2026-06-25"},{"cvss_score":8.8,"headline":"Linux Kernel Improper Input Validation","id":"CVE-2013-6282","kev_date_added":"2022-09-15","published":"2013-11-19"},{"cvss_score":8.4,"headline":"Linux Kernel Heap-Based Buffer Overflow","id":"CVE-2022-0185","kev_date_added":"2024-08-21","published":"2022-02-11"},{"cvss_score":8.4,"headline":"Linux Kernel Privilege Escalation","id":"CVE-2013-2094","kev_date_added":"2022-09-15","published":"2013-05-14"},{"cvss_score":7.8,"headline":"Linux Kernel Unspecified","id":"CVE-2026-53362","kev_date_added":"2026-08-27","published":"2026-07-04"},{"cvss_score":7.8,"headline":"Linux Kernel Missing Initialization of a Variable","id":"CVE-2026-46300","kev_date_added":"2026-10-28","published":"2026-05-23"},{"cvss_score":7.8,"headline":"Linux Kernel Race Condition","id":"CVE-2025-39964","kev_date_added":"2026-09-18","published":"2025-10-13"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-05-23","vendors":["Linux"]},"summary":"A race condition in the Linux kernel's btrfs filesystem can cause a NULL pointer dereference, leading to a system crash.","url":"https://insights.sbomify.com/CVE-2023-52896/"}