In the Linux kernel, the following vulnerability has been resolved:
btrfs: clean up our handling of refs == 0 in snapshot delete
In reada we BUGON(refs == 0), which could be unkind since we aren't holding a lock on the extent leaf and thus could get a transient incorrect answer. In walkdownproc we also BUGON(refs == 0), which could happen if we have extent tree corruption. Change that to return -EUCLEAN. In dowalkdown() we catch this case and handle it correctly, however we return -EIO, which -EUCLEAN is a more appropriate error code. Finally in walkupproc we have the same BUG_ON(refs == 0), so convert that to proper error handling. Also adjust the error message so we can actually do something with the information.
{ "vanir_signatures": [ { "id": "CVE-2024-46840-00143b4d", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c60676b81fab456b672796830f6d8057058f029c", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 1459.0, "function_hash": "291459978780867733175718192202785357341" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "walk_down_proc" } }, { "id": "CVE-2024-46840-012bb157", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c847b28a799733b04574060ab9d00f215970627d", "deprecated": false, "signature_version": "v1", "signature_type": "Line", "digest": { "threshold": 0.9, "line_hashes": [ "291955515194452926788407274911510821130", "253152912341531563425470564886656486741", "264089301073802851351904612580091755371", "88788384994810780268212676417006248170", "177227911556930695721740830514097847572", "290747272109273994308207202952016312778", "100116492062350943686653569027944973225", "326565453880167359908641367848899114641", "240443113275481128609985149502527145778", "263553580429964920419125536963921096943", "65518655872630061335177923335600206291", "211241028928382313304927076200650731850", "231676748920047264947900612385628751845", "320181392905331014268995162247919509055", "17542456642156039155883509704709348868", "193666240677681301702237782575019419512", "28373882723095944781455132094744213622" ] }, "target": { "file": "fs/btrfs/extent-tree.c" } }, { "id": "CVE-2024-46840-01d8a02d", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7d1df13bf078ffebfedd361d714ff6cee1ff01b9", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 3880.0, "function_hash": "271705493713726704634758855828747202806" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "do_walk_down" } }, { "id": "CVE-2024-46840-0595c5c9", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@03804641ec2d0da4fa088ad21c88e703d151ce16", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 2434.0, "function_hash": "24649668184156666902652863154603827714" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "walk_up_proc" } }, { "id": "CVE-2024-46840-06389869", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9cc887ac24b7a0598f4042ae9af6b9a33072f75b", "deprecated": false, "signature_version": "v1", "signature_type": "Line", "digest": { "threshold": 0.9, "line_hashes": [ "291955515194452926788407274911510821130", "253152912341531563425470564886656486741", "264089301073802851351904612580091755371", "88788384994810780268212676417006248170", "177227911556930695721740830514097847572", "290747272109273994308207202952016312778", "100116492062350943686653569027944973225", "326565453880167359908641367848899114641", "240443113275481128609985149502527145778", "263553580429964920419125536963921096943", "65518655872630061335177923335600206291", "211241028928382313304927076200650731850", "231676748920047264947900612385628751845", "320181392905331014268995162247919509055", "17542456642156039155883509704709348868", "193666240677681301702237782575019419512", "28373882723095944781455132094744213622" ] }, "target": { "file": "fs/btrfs/extent-tree.c" } }, { "id": "CVE-2024-46840-0edbb344", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@728d4d045b628e006b48a448f3326a7194c88d32", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 2445.0, "function_hash": "119164374841356978906252871258099452326" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "walk_up_proc" } }, { "id": "CVE-2024-46840-1b6d00ab", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7d1df13bf078ffebfedd361d714ff6cee1ff01b9", "deprecated": false, "signature_version": "v1", "signature_type": "Line", "digest": { "threshold": 0.9, "line_hashes": [ "291955515194452926788407274911510821130", "253152912341531563425470564886656486741", "264089301073802851351904612580091755371", "88788384994810780268212676417006248170", "177227911556930695721740830514097847572", "290747272109273994308207202952016312778", "100116492062350943686653569027944973225", "326565453880167359908641367848899114641", "240443113275481128609985149502527145778", "263553580429964920419125536963921096943", "65518655872630061335177923335600206291", "211241028928382313304927076200650731850", "231676748920047264947900612385628751845", "320181392905331014268995162247919509055", "17542456642156039155883509704709348868", "193666240677681301702237782575019419512", "28373882723095944781455132094744213622" ] }, "target": { "file": "fs/btrfs/extent-tree.c" } }, { "id": "CVE-2024-46840-1d6cf989", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@71291aa7246645ef622621934d2067400380645e", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 1624.0, "function_hash": "117195553560905182120382997874818875348" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "reada_walk_down" } }, { "id": "CVE-2024-46840-1ea26c55", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@71291aa7246645ef622621934d2067400380645e", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 2488.0, "function_hash": "237417421067134549184866756695919442016" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "walk_up_proc" } }, { "id": "CVE-2024-46840-4cf65ca4", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7d1df13bf078ffebfedd361d714ff6cee1ff01b9", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 1624.0, "function_hash": "117195553560905182120382997874818875348" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "reada_walk_down" } }, { "id": "CVE-2024-46840-4f3e9650", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b8ccef048354074a548f108e51d0557d6adfd3a3", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 1914.0, "function_hash": "337998404665852007547582488684993064306" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "do_walk_down" } }, { "id": "CVE-2024-46840-5996740c", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@728d4d045b628e006b48a448f3326a7194c88d32", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 1459.0, "function_hash": "291459978780867733175718192202785357341" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "walk_down_proc" } }, { "id": "CVE-2024-46840-5c7616ec", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@728d4d045b628e006b48a448f3326a7194c88d32", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 3784.0, "function_hash": "267076711903051670549540664328106217040" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "do_walk_down" } }, { "id": "CVE-2024-46840-6463cb53", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7d1df13bf078ffebfedd361d714ff6cee1ff01b9", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 1436.0, "function_hash": "145748448024677118657277557969541221057" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "walk_down_proc" } }, { "id": "CVE-2024-46840-66a7103f", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9cc887ac24b7a0598f4042ae9af6b9a33072f75b", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 2445.0, "function_hash": "119164374841356978906252871258099452326" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "walk_up_proc" } }, { "id": "CVE-2024-46840-70364f5f", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@03804641ec2d0da4fa088ad21c88e703d151ce16", "deprecated": false, "signature_version": "v1", "signature_type": "Line", "digest": { "threshold": 0.9, "line_hashes": [ "199564707242482894373720075255262140328", "253152912341531563425470564886656486741", "264089301073802851351904612580091755371", "88788384994810780268212676417006248170", "24649609288819981406083293895002570460", "290747272109273994308207202952016312778", "100116492062350943686653569027944973225", "326565453880167359908641367848899114641", "240443113275481128609985149502527145778", "263553580429964920419125536963921096943", "65518655872630061335177923335600206291", "211241028928382313304927076200650731850", "231676748920047264947900612385628751845", "320181392905331014268995162247919509055", "17542456642156039155883509704709348868", "193666240677681301702237782575019419512", "28373882723095944781455132094744213622" ] }, "target": { "file": "fs/btrfs/extent-tree.c" } }, { "id": "CVE-2024-46840-7d3a5001", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c847b28a799733b04574060ab9d00f215970627d", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 1624.0, "function_hash": "117195553560905182120382997874818875348" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "reada_walk_down" } }, { "id": "CVE-2024-46840-8036e548", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b8ccef048354074a548f108e51d0557d6adfd3a3", "deprecated": false, "signature_version": "v1", "signature_type": "Line", "digest": { "threshold": 0.9, "line_hashes": [ "199564707242482894373720075255262140328", "271785969557917201304308457815846090171", "256470542635545924920685751376187268807", "73382120044310804879189158994333488436", "24649609288819981406083293895002570460", "290747272109273994308207202952016312778", "100116492062350943686653569027944973225", "326565453880167359908641367848899114641", "240443113275481128609985149502527145778", "263553580429964920419125536963921096943", "65518655872630061335177923335600206291", "211241028928382313304927076200650731850", "115401760720926459351583087521996928313", "320181392905331014268995162247919509055", "17542456642156039155883509704709348868", "193666240677681301702237782575019419512", "28373882723095944781455132094744213622" ] }, "target": { "file": "fs/btrfs/extent-tree.c" } }, { "id": "CVE-2024-46840-89290319", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9cc887ac24b7a0598f4042ae9af6b9a33072f75b", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 1624.0, "function_hash": "117195553560905182120382997874818875348" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "reada_walk_down" } }, { "id": "CVE-2024-46840-8f21a0e9", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c60676b81fab456b672796830f6d8057058f029c", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 3807.0, "function_hash": "132571181762816428974255170376793752176" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "do_walk_down" } }, { "id": "CVE-2024-46840-90ad9142", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7d1df13bf078ffebfedd361d714ff6cee1ff01b9", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 2413.0, "function_hash": "161731814742830384569307198421848976987" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "walk_up_proc" } }, { "id": "CVE-2024-46840-914eb682", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c847b28a799733b04574060ab9d00f215970627d", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 3405.0, "function_hash": "42344340747177301015567146764735155071" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "do_walk_down" } }, { "id": "CVE-2024-46840-9345dc6e", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b8ccef048354074a548f108e51d0557d6adfd3a3", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 2380.0, "function_hash": "318398604795740675798687506389230877108" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "walk_up_proc" } }, { "id": "CVE-2024-46840-9f099f7a", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c60676b81fab456b672796830f6d8057058f029c", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 1624.0, "function_hash": "117195553560905182120382997874818875348" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "reada_walk_down" } }, { "id": "CVE-2024-46840-a498d085", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@728d4d045b628e006b48a448f3326a7194c88d32", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 1624.0, "function_hash": "117195553560905182120382997874818875348" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "reada_walk_down" } }, { "id": "CVE-2024-46840-a548f060", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b8ccef048354074a548f108e51d0557d6adfd3a3", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 1254.0, "function_hash": "219910203017664551816425096763530188747" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "reada_walk_down" } }, { "id": "CVE-2024-46840-abcef4e6", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9cc887ac24b7a0598f4042ae9af6b9a33072f75b", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 1455.0, "function_hash": "15530599934130228484787646652387941439" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "walk_down_proc" } }, { "id": "CVE-2024-46840-b0c5340e", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@03804641ec2d0da4fa088ad21c88e703d151ce16", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 1631.0, "function_hash": "139459420134141950724249900032894042395" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "reada_walk_down" } }, { "id": "CVE-2024-46840-b8860ac2", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c60676b81fab456b672796830f6d8057058f029c", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 2488.0, "function_hash": "237417421067134549184866756695919442016" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "walk_up_proc" } }, { "id": "CVE-2024-46840-bc339d17", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c60676b81fab456b672796830f6d8057058f029c", "deprecated": false, "signature_version": "v1", "signature_type": "Line", "digest": { "threshold": 0.9, "line_hashes": [ "291955515194452926788407274911510821130", "253152912341531563425470564886656486741", "264089301073802851351904612580091755371", "88788384994810780268212676417006248170", "177227911556930695721740830514097847572", "290747272109273994308207202952016312778", "100116492062350943686653569027944973225", "326565453880167359908641367848899114641", "240443113275481128609985149502527145778", "263553580429964920419125536963921096943", "65518655872630061335177923335600206291", "211241028928382313304927076200650731850", "231676748920047264947900612385628751845", "320181392905331014268995162247919509055", "17542456642156039155883509704709348868", "193666240677681301702237782575019419512", "28373882723095944781455132094744213622" ] }, "target": { "file": "fs/btrfs/extent-tree.c" } }, { "id": "CVE-2024-46840-c066bb7c", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c847b28a799733b04574060ab9d00f215970627d", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 1487.0, "function_hash": "134564981249788292749333048017956549129" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "walk_down_proc" } }, { "id": "CVE-2024-46840-c9096fa7", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@03804641ec2d0da4fa088ad21c88e703d151ce16", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 1402.0, "function_hash": "329830322984074656958776956508858506561" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "walk_down_proc" } }, { "id": "CVE-2024-46840-cd6113d7", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b8ccef048354074a548f108e51d0557d6adfd3a3", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 1511.0, "function_hash": "209118502976706086921560875664864122563" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "walk_down_proc" } }, { "id": "CVE-2024-46840-d047d5ba", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@03804641ec2d0da4fa088ad21c88e703d151ce16", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 3872.0, "function_hash": "241349771417830559213835791551078460566" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "do_walk_down" } }, { "id": "CVE-2024-46840-d523bcf0", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@71291aa7246645ef622621934d2067400380645e", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 1481.0, "function_hash": "43706186212121134363847149487145385841" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "walk_down_proc" } }, { "id": "CVE-2024-46840-e7be8b25", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9cc887ac24b7a0598f4042ae9af6b9a33072f75b", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 3784.0, "function_hash": "267076711903051670549540664328106217040" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "do_walk_down" } }, { "id": "CVE-2024-46840-f367d8f4", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@71291aa7246645ef622621934d2067400380645e", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 3807.0, "function_hash": "132571181762816428974255170376793752176" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "do_walk_down" } }, { "id": "CVE-2024-46840-f52abd80", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c847b28a799733b04574060ab9d00f215970627d", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 2442.0, "function_hash": "207080879680445142649111681296525887157" }, "target": { "file": "fs/btrfs/extent-tree.c", "function": "walk_up_proc" } }, { "id": "CVE-2024-46840-f5a3b6f4", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@728d4d045b628e006b48a448f3326a7194c88d32", "deprecated": false, "signature_version": "v1", "signature_type": "Line", "digest": { "threshold": 0.9, "line_hashes": [ "291955515194452926788407274911510821130", "253152912341531563425470564886656486741", "264089301073802851351904612580091755371", "88788384994810780268212676417006248170", "177227911556930695721740830514097847572", "290747272109273994308207202952016312778", "100116492062350943686653569027944973225", "326565453880167359908641367848899114641", "240443113275481128609985149502527145778", "263553580429964920419125536963921096943", "65518655872630061335177923335600206291", "211241028928382313304927076200650731850", "231676748920047264947900612385628751845", "320181392905331014268995162247919509055", "17542456642156039155883509704709348868", "193666240677681301702237782575019419512", "28373882723095944781455132094744213622" ] }, "target": { "file": "fs/btrfs/extent-tree.c" } }, { "id": "CVE-2024-46840-febae453", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@71291aa7246645ef622621934d2067400380645e", "deprecated": false, "signature_version": "v1", "signature_type": "Line", "digest": { "threshold": 0.9, "line_hashes": [ "291955515194452926788407274911510821130", "253152912341531563425470564886656486741", "264089301073802851351904612580091755371", "88788384994810780268212676417006248170", "177227911556930695721740830514097847572", "290747272109273994308207202952016312778", "100116492062350943686653569027944973225", "326565453880167359908641367848899114641", "240443113275481128609985149502527145778", "263553580429964920419125536963921096943", "65518655872630061335177923335600206291", "211241028928382313304927076200650731850", "231676748920047264947900612385628751845", "320181392905331014268995162247919509055", "17542456642156039155883509704709348868", "193666240677681301702237782575019419512", "28373882723095944781455132094744213622" ] }, "target": { "file": "fs/btrfs/extent-tree.c" } } ] }