{"api_version":"1","generated_at":"2026-08-22T04:27:10+00:00","cve":"CVE-2023-53862","urls":{"html":"https://cve.report/CVE-2023-53862","api":"https://cve.report/api/cve/CVE-2023-53862.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2023-53862","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2023-53862"},"summary":{"title":"hfs: fix missing hfs_bnode_get() in __hfs_bnode_create","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nhfs: fix missing hfs_bnode_get() in __hfs_bnode_create\n\nSyzbot found a kernel BUG in hfs_bnode_put():\n\n kernel BUG at fs/hfs/bnode.c:466!\n invalid opcode: 0000 [#1] PREEMPT SMP KASAN\n CPU: 0 PID: 3634 Comm: kworker/u4:5 Not tainted 6.1.0-rc7-syzkaller-00190-g97ee9d1c1696 #0\n Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022\n Workqueue: writeback wb_workfn (flush-7:0)\n RIP: 0010:hfs_bnode_put+0x46f/0x480 fs/hfs/bnode.c:466\n Code: 8a 80 ff e9 73 fe ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c a0 fe ff ff 48 89 df e8 db 8a 80 ff e9 93 fe ff ff e8 a1 68 2c ff <0f> 0b e8 9a 68 2c ff 0f 0b 0f 1f 84 00 00 00 00 00 55 41 57 41 56\n RSP: 0018:ffffc90003b4f258 EFLAGS: 00010293\n RAX: ffffffff825e318f RBX: 0000000000000000 RCX: ffff8880739dd7c0\n RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000\n RBP: ffffc90003b4f430 R08: ffffffff825e2d9b R09: ffffed10045157d1\n R10: ffffed10045157d1 R11: 1ffff110045157d0 R12: ffff8880228abe80\n R13: ffff88807016c000 R14: dffffc0000000000 R15: ffff8880228abe00\n FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000\n CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033\n CR2: 00007fa6ebe88718 CR3: 000000001e93d000 CR4: 00000000003506f0\n DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000\n DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400\n Call Trace:\n  <TASK>\n  hfs_write_inode+0x1bc/0xb40\n  write_inode fs/fs-writeback.c:1440 [inline]\n  __writeback_single_inode+0x4d6/0x670 fs/fs-writeback.c:1652\n  writeback_sb_inodes+0xb3b/0x18f0 fs/fs-writeback.c:1878\n  __writeback_inodes_wb+0x125/0x420 fs/fs-writeback.c:1949\n  wb_writeback+0x440/0x7b0 fs/fs-writeback.c:2054\n  wb_check_start_all fs/fs-writeback.c:2176 [inline]\n  wb_do_writeback fs/fs-writeback.c:2202 [inline]\n  wb_workfn+0x827/0xef0 fs/fs-writeback.c:2235\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:306\n  </TASK>\n\nThe BUG_ON() is triggered at here:\n\n/* Dispose of resources used by a node */\nvoid hfs_bnode_put(struct hfs_bnode *node)\n{\n\tif (node) {\n \t\t<skipped>\n \t\tBUG_ON(!atomic_read(&node->refcnt)); <- we have issue here!!!!\n \t\t<skipped>\n \t}\n}\n\nBy tracing the refcnt, I found the node is created by hfs_bmap_alloc()\nwith refcnt 1.  Then the node is used by hfs_btree_write().  There is a\nmissing of hfs_bnode_get() after find the node.  The issue happened in\nfollowing path:\n\n<alloc>\n hfs_bmap_alloc\n   hfs_bnode_find\n     __hfs_bnode_create   <- allocate a new node with refcnt 1.\n   hfs_bnode_put          <- decrease the refcnt\n\n<write>\n hfs_btree_write\n   hfs_bnode_find\n     __hfs_bnode_create\n       hfs_bnode_findhash <- find the node without refcnt increased.\n   hfs_bnode_put\t  <- trigger the BUG_ON() since refcnt is 0.","state":"PUBLISHED","assigner":"Linux","published_at":"2025-12-09 16:17:26","updated_at":"2026-08-04 10:19:24"},"problem_types":[],"metrics":[{"version":"3.1","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"baseScore":7.8,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"references":[{"url":"https://git.kernel.org/stable/c/2cab8db14566cf6a516c1f103a60cf6b7f54b1e5","name":"https://git.kernel.org/stable/c/2cab8db14566cf6a516c1f103a60cf6b7f54b1e5","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/eda6879272e4df5456afc36642052ea066f58410","name":"https://git.kernel.org/stable/c/eda6879272e4df5456afc36642052ea066f58410","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/062af3e9930762d1fd22946748d34e0d859e4a8e","name":"https://git.kernel.org/stable/c/062af3e9930762d1fd22946748d34e0d859e4a8e","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/3a9065a33988c02789722be612f7c42fb8ebbb22","name":"https://git.kernel.org/stable/c/3a9065a33988c02789722be612f7c42fb8ebbb22","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/a9dc087fd3c484fd1ed18c5efb290efaaf44ce03","name":"https://git.kernel.org/stable/c/a9dc087fd3c484fd1ed18c5efb290efaaf44ce03","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/8140cdc57bc5844cd5e1392673ec2dbf8fdc6940","name":"https://git.kernel.org/stable/c/8140cdc57bc5844cd5e1392673ec2dbf8fdc6940","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/38d72e6604b9f96dffcc0565090cc01622a37b2a","name":"https://git.kernel.org/stable/c/38d72e6604b9f96dffcc0565090cc01622a37b2a","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/dc9f78b6d254427a06e568f2887b1011ef3143ef","name":"https://git.kernel.org/stable/c/dc9f78b6d254427a06e568f2887b1011ef3143ef","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2023-53862","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-53862","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 062af3e9930762d1fd22946748d34e0d859e4a8e git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 3a9065a33988c02789722be612f7c42fb8ebbb22 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 eda6879272e4df5456afc36642052ea066f58410 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 dc9f78b6d254427a06e568f2887b1011ef3143ef git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 2cab8db14566cf6a516c1f103a60cf6b7f54b1e5 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 8140cdc57bc5844cd5e1392673ec2dbf8fdc6940 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 38d72e6604b9f96dffcc0565090cc01622a37b2a git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 a9dc087fd3c484fd1ed18c5efb290efaaf44ce03 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 2.6.12","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 2.6.12 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 4.14.308 4.14.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 4.19.276 4.19.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.4.235 5.4.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.10.173 5.10.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.15.99 5.15.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1.16 6.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.2.3 6.2.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.3 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2023","cve_id":"53862","cve":"CVE-2023-53862","epss":"0.001840000","percentile":"0.081670000","score_date":"2026-08-06","updated_at":"2026-08-07 00:14:20"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["fs/hfs/bnode.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"062af3e9930762d1fd22946748d34e0d859e4a8e","status":"affected","version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","versionType":"git"},{"lessThan":"3a9065a33988c02789722be612f7c42fb8ebbb22","status":"affected","version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","versionType":"git"},{"lessThan":"eda6879272e4df5456afc36642052ea066f58410","status":"affected","version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","versionType":"git"},{"lessThan":"dc9f78b6d254427a06e568f2887b1011ef3143ef","status":"affected","version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","versionType":"git"},{"lessThan":"2cab8db14566cf6a516c1f103a60cf6b7f54b1e5","status":"affected","version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","versionType":"git"},{"lessThan":"8140cdc57bc5844cd5e1392673ec2dbf8fdc6940","status":"affected","version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","versionType":"git"},{"lessThan":"38d72e6604b9f96dffcc0565090cc01622a37b2a","status":"affected","version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","versionType":"git"},{"lessThan":"a9dc087fd3c484fd1ed18c5efb290efaaf44ce03","status":"affected","version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["fs/hfs/bnode.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"2.6.12"},{"lessThan":"2.6.12","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"4.14.*","status":"unaffected","version":"4.14.308","versionType":"semver"},{"lessThanOrEqual":"4.19.*","status":"unaffected","version":"4.19.276","versionType":"semver"},{"lessThanOrEqual":"5.4.*","status":"unaffected","version":"5.4.235","versionType":"semver"},{"lessThanOrEqual":"5.10.*","status":"unaffected","version":"5.10.173","versionType":"semver"},{"lessThanOrEqual":"5.15.*","status":"unaffected","version":"5.15.99","versionType":"semver"},{"lessThanOrEqual":"6.1.*","status":"unaffected","version":"6.1.16","versionType":"semver"},{"lessThanOrEqual":"6.2.*","status":"unaffected","version":"6.2.3","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"6.3","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"4.14.308","versionStartIncluding":"2.6.12","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"4.19.276","versionStartIncluding":"2.6.12","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.4.235","versionStartIncluding":"2.6.12","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.10.173","versionStartIncluding":"2.6.12","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.15.99","versionStartIncluding":"2.6.12","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.1.16","versionStartIncluding":"2.6.12","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.2.3","versionStartIncluding":"2.6.12","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.3","versionStartIncluding":"2.6.12","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nhfs: fix missing hfs_bnode_get() in __hfs_bnode_create\n\nSyzbot found a kernel BUG in hfs_bnode_put():\n\n kernel BUG at fs/hfs/bnode.c:466!\n invalid opcode: 0000 [#1] PREEMPT SMP KASAN\n CPU: 0 PID: 3634 Comm: kworker/u4:5 Not tainted 6.1.0-rc7-syzkaller-00190-g97ee9d1c1696 #0\n Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022\n Workqueue: writeback wb_workfn (flush-7:0)\n RIP: 0010:hfs_bnode_put+0x46f/0x480 fs/hfs/bnode.c:466\n Code: 8a 80 ff e9 73 fe ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c a0 fe ff ff 48 89 df e8 db 8a 80 ff e9 93 fe ff ff e8 a1 68 2c ff <0f> 0b e8 9a 68 2c ff 0f 0b 0f 1f 84 00 00 00 00 00 55 41 57 41 56\n RSP: 0018:ffffc90003b4f258 EFLAGS: 00010293\n RAX: ffffffff825e318f RBX: 0000000000000000 RCX: ffff8880739dd7c0\n RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000\n RBP: ffffc90003b4f430 R08: ffffffff825e2d9b R09: ffffed10045157d1\n R10: ffffed10045157d1 R11: 1ffff110045157d0 R12: ffff8880228abe80\n R13: ffff88807016c000 R14: dffffc0000000000 R15: ffff8880228abe00\n FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000\n CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033\n CR2: 00007fa6ebe88718 CR3: 000000001e93d000 CR4: 00000000003506f0\n DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000\n DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400\n Call Trace:\n  <TASK>\n  hfs_write_inode+0x1bc/0xb40\n  write_inode fs/fs-writeback.c:1440 [inline]\n  __writeback_single_inode+0x4d6/0x670 fs/fs-writeback.c:1652\n  writeback_sb_inodes+0xb3b/0x18f0 fs/fs-writeback.c:1878\n  __writeback_inodes_wb+0x125/0x420 fs/fs-writeback.c:1949\n  wb_writeback+0x440/0x7b0 fs/fs-writeback.c:2054\n  wb_check_start_all fs/fs-writeback.c:2176 [inline]\n  wb_do_writeback fs/fs-writeback.c:2202 [inline]\n  wb_workfn+0x827/0xef0 fs/fs-writeback.c:2235\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:306\n  </TASK>\n\nThe BUG_ON() is triggered at here:\n\n/* Dispose of resources used by a node */\nvoid hfs_bnode_put(struct hfs_bnode *node)\n{\n\tif (node) {\n \t\t<skipped>\n \t\tBUG_ON(!atomic_read(&node->refcnt)); <- we have issue here!!!!\n \t\t<skipped>\n \t}\n}\n\nBy tracing the refcnt, I found the node is created by hfs_bmap_alloc()\nwith refcnt 1.  Then the node is used by hfs_btree_write().  There is a\nmissing of hfs_bnode_get() after find the node.  The issue happened in\nfollowing path:\n\n<alloc>\n hfs_bmap_alloc\n   hfs_bnode_find\n     __hfs_bnode_create   <- allocate a new node with refcnt 1.\n   hfs_bnode_put          <- decrease the refcnt\n\n<write>\n hfs_btree_write\n   hfs_bnode_find\n     __hfs_bnode_create\n       hfs_bnode_findhash <- find the node without refcnt increased.\n   hfs_bnode_put\t  <- trigger the BUG_ON() since refcnt is 0."}],"metrics":[{"cvssV3_1":{"baseScore":7.8,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"providerMetadata":{"dateUpdated":"2026-08-04T09:17:01.520Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/062af3e9930762d1fd22946748d34e0d859e4a8e"},{"url":"https://git.kernel.org/stable/c/3a9065a33988c02789722be612f7c42fb8ebbb22"},{"url":"https://git.kernel.org/stable/c/eda6879272e4df5456afc36642052ea066f58410"},{"url":"https://git.kernel.org/stable/c/dc9f78b6d254427a06e568f2887b1011ef3143ef"},{"url":"https://git.kernel.org/stable/c/2cab8db14566cf6a516c1f103a60cf6b7f54b1e5"},{"url":"https://git.kernel.org/stable/c/8140cdc57bc5844cd5e1392673ec2dbf8fdc6940"},{"url":"https://git.kernel.org/stable/c/38d72e6604b9f96dffcc0565090cc01622a37b2a"},{"url":"https://git.kernel.org/stable/c/a9dc087fd3c484fd1ed18c5efb290efaaf44ce03"}],"title":"hfs: fix missing hfs_bnode_get() in __hfs_bnode_create","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2023-53862","datePublished":"2025-12-09T01:30:30.902Z","dateReserved":"2025-12-09T01:27:17.829Z","dateUpdated":"2026-08-04T09:17:01.520Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2025-12-09 16:17:26","lastModifiedDate":"2026-08-04 10:19:24","problem_types":[],"metrics":{"cvssMetricV31":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":1.8,"impactScore":5.9}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2023","CveId":"53862","Ordinal":"1","Title":"hfs: fix missing hfs_bnode_get() in __hfs_bnode_create","CVE":"CVE-2023-53862","Year":"2023"},"notes":[{"CveYear":"2023","CveId":"53862","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nhfs: fix missing hfs_bnode_get() in __hfs_bnode_create\n\nSyzbot found a kernel BUG in hfs_bnode_put():\n\n kernel BUG at fs/hfs/bnode.c:466!\n invalid opcode: 0000 [#1] PREEMPT SMP KASAN\n CPU: 0 PID: 3634 Comm: kworker/u4:5 Not tainted 6.1.0-rc7-syzkaller-00190-g97ee9d1c1696 #0\n Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022\n Workqueue: writeback wb_workfn (flush-7:0)\n RIP: 0010:hfs_bnode_put+0x46f/0x480 fs/hfs/bnode.c:466\n Code: 8a 80 ff e9 73 fe ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c a0 fe ff ff 48 89 df e8 db 8a 80 ff e9 93 fe ff ff e8 a1 68 2c ff <0f> 0b e8 9a 68 2c ff 0f 0b 0f 1f 84 00 00 00 00 00 55 41 57 41 56\n RSP: 0018:ffffc90003b4f258 EFLAGS: 00010293\n RAX: ffffffff825e318f RBX: 0000000000000000 RCX: ffff8880739dd7c0\n RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000\n RBP: ffffc90003b4f430 R08: ffffffff825e2d9b R09: ffffed10045157d1\n R10: ffffed10045157d1 R11: 1ffff110045157d0 R12: ffff8880228abe80\n R13: ffff88807016c000 R14: dffffc0000000000 R15: ffff8880228abe00\n FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000\n CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033\n CR2: 00007fa6ebe88718 CR3: 000000001e93d000 CR4: 00000000003506f0\n DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000\n DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400\n Call Trace:\n  <TASK>\n  hfs_write_inode+0x1bc/0xb40\n  write_inode fs/fs-writeback.c:1440 [inline]\n  __writeback_single_inode+0x4d6/0x670 fs/fs-writeback.c:1652\n  writeback_sb_inodes+0xb3b/0x18f0 fs/fs-writeback.c:1878\n  __writeback_inodes_wb+0x125/0x420 fs/fs-writeback.c:1949\n  wb_writeback+0x440/0x7b0 fs/fs-writeback.c:2054\n  wb_check_start_all fs/fs-writeback.c:2176 [inline]\n  wb_do_writeback fs/fs-writeback.c:2202 [inline]\n  wb_workfn+0x827/0xef0 fs/fs-writeback.c:2235\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:306\n  </TASK>\n\nThe BUG_ON() is triggered at here:\n\n/* Dispose of resources used by a node */\nvoid hfs_bnode_put(struct hfs_bnode *node)\n{\n\tif (node) {\n \t\t<skipped>\n \t\tBUG_ON(!atomic_read(&node->refcnt)); <- we have issue here!!!!\n \t\t<skipped>\n \t}\n}\n\nBy tracing the refcnt, I found the node is created by hfs_bmap_alloc()\nwith refcnt 1.  Then the node is used by hfs_btree_write().  There is a\nmissing of hfs_bnode_get() after find the node.  The issue happened in\nfollowing path:\n\n<alloc>\n hfs_bmap_alloc\n   hfs_bnode_find\n     __hfs_bnode_create   <- allocate a new node with refcnt 1.\n   hfs_bnode_put          <- decrease the refcnt\n\n<write>\n hfs_btree_write\n   hfs_bnode_find\n     __hfs_bnode_create\n       hfs_bnode_findhash <- find the node without refcnt increased.\n   hfs_bnode_put\t  <- trigger the BUG_ON() since refcnt is 0.","Type":"Description","Title":"hfs: fix missing hfs_bnode_get() in __hfs_bnode_create"}]}}}