btrfs: fix adding block group to a reclaim list and the unused list during reclaim
In the Linux kernel, the following vulnerability has been resolved: btrfs: fix adding block group to a reclaim list and the unused list during reclaim There is a potential parallel list adding for retrying in btrfs_reclaim_bgs_work and adding to the unused list. Since the block group is removed from the reclaim list and it is on a relocation work, it can be added into the unused list in parallel. When that happens, adding it to the reclaim list will corrupt the list head and trigger list corruption like below. Fix it by taking fs_info->unused_bgs_lock. [177.504][T2585409] BTRFS error (device nullb1): error relocating ch= unk 2415919104 [177.514][T2585409] list_del corruption. next->prev should be ff1100= 0344b119c0, but was ff11000377e87c70. (next=3Dff110002390cd9c0) [177.529][T2585409] ------------[ cut here ]------------ [177.537][T2585409] kernel BUG at lib/list_debug.c:65! [177.545][T2585409] Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI [177.555][T2585409] CPU: 9 PID: 2585409 Comm: kworker/u128:2 Tainted: G W 6.10.0-rc5-kts #1 [177.568][T2585409] Hardware name: Supermicro SYS-520P-WTR/X12SPW-TF, BIOS 1.2 02/14/2022 [177.579][T2585409] Workqueue: events_unbound btrfs_reclaim_bgs_work[btrfs] [177.589][T2585409] RIP: 0010:__list_del_entry_valid_or_report.cold+0x70/0x72 [177.624][T2585409] RSP: 0018:ff11000377e87a70 EFLAGS: 00010286 [177.633][T2585409] RAX: 000000000000006d RBX: ff11000344b119c0 RCX:0000000000000000 [177.644][T2585409] RDX: 000000000000006d RSI: 00
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 5.15.163, 6.1.98, 6.6.39, 6.9.9
- CVEs
- CVE-2024-42103
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 12:50 UTC · Revision 1
Source evidence
btrfs: fix adding block group to a reclaim list and the unused list during reclaim
core-osv · Original sourcePublished 30 Jul 2024, 07:45 UTC
In the Linux kernel, the following vulnerability has been resolved: btrfs: fix adding block group to a reclaim list and the unused list during reclaim There is a potential parallel list adding for retrying in btrfs_reclaim_bgs_work and adding to the unused list. Since the block group is removed from the reclaim list and it is on a relocation work, it can be added into the unused list in parallel. When that happens, adding it to the reclaim list will corrupt the list head and trigger list corruption like below. Fix it by taking fs_info->unused_bgs_lock. [177.504][T2585409] BTRFS error (device nullb1): error relocating ch= unk 2415919104 [177.514][T2585409] list_del corruption. next->prev should be ff1100= 0344b119c0, but was ff11000377e87c70. (next=3Dff110002390cd9c0) [177.529][T2585409] ------------[ cut here ]------------ [177.537][T2585409] kernel BUG at lib/list_debug.c:65! [177.545][T2585409] Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI [177.555][T2585409] CPU: 9 PID: 2585409 Comm: kworker/u128:2 Tainted: G W 6.10.0-rc5-kts #1 [177.568][T2585409] Hardware name: Supermicro SYS-520P-WTR/X12SPW-TF, BIOS 1.2 02/14/2022 [177.579][T2585409] Workqueue: events_unbound btrfs_reclaim_bgs_work[btrfs] [177.589][T2585409] RIP: 0010:__list_del_entry_valid_or_report.cold+0x70/0x72 [177.624][T2585409] RSP: 0018:ff11000377e87a70 EFLAGS: 00010286 [177.633][T2585409] RAX: 000000000000006d RBX: ff11000344b119c0 RCX:0000000000000000 [177.644][T2585409] RDX: 000000000000006d RSI: 00
osv:CVE-2024-42103
Kernel
Fixed versions: 5.15.163, 6.1.98, 6.6.39, 6.9.9
Complete source record
{
"id": "cbbd5d182e154d81462880dff014489317a4c16e9eec251681ba38717183345a",
"url": "https://osv.dev/vulnerability/CVE-2024-42103",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "btrfs: fix adding block group to a reclaim list and the unused list during reclaim",
"summary": "In the Linux kernel, the following vulnerability has been resolved: btrfs: fix adding block group to a reclaim list and the unused list during reclaim There is a potential parallel list adding for retrying in btrfs_reclaim_bgs_work and adding to the unused list. Since the block group is removed from the reclaim list and it is on a relocation work, it can be added into the unused list in parallel. When that happens, adding it to the reclaim list will corrupt the list head and trigger list corruption like below. Fix it by taking fs_info->unused_bgs_lock. [177.504][T2585409] BTRFS error (device nullb1): error relocating ch= unk 2415919104 [177.514][T2585409] list_del corruption. next->prev should be ff1100= 0344b119c0, but was ff11000377e87c70. (next=3Dff110002390cd9c0) [177.529][T2585409] ------------[ cut here ]------------ [177.537][T2585409] kernel BUG at lib/list_debug.c:65! [177.545][T2585409] Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI [177.555][T2585409] CPU: 9 PID: 2585409 Comm: kworker/u128:2 Tainted: G W 6.10.0-rc5-kts #1 [177.568][T2585409] Hardware name: Supermicro SYS-520P-WTR/X12SPW-TF, BIOS 1.2 02/14/2022 [177.579][T2585409] Workqueue: events_unbound btrfs_reclaim_bgs_work[btrfs] [177.589][T2585409] RIP: 0010:__list_del_entry_valid_or_report.cold+0x70/0x72 [177.624][T2585409] RSP: 0018:ff11000377e87a70 EFLAGS: 00010286 [177.633][T2585409] RAX: 000000000000006d RBX: ff11000344b119c0 RCX:0000000000000000 [177.644][T2585409] RDX: 000000000000006d RSI: 00",
"evidence": "osv:CVE-2024-42103",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.15.163",
"evidence": "/affected/1/ranges"
},
{
"value": "6.1.98",
"evidence": "/affected/1/ranges"
},
{
"value": "6.6.39",
"evidence": "/affected/1/ranges"
},
{
"value": "6.9.9",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "CVE-2024-42103",
"aliases": [
"CVE-2024-42103"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "2311fd03027d2c1b2ac4a3a41153a16352659b65"
},
{
"fixed": "522b39bd7163e8dc49f8cf10b9b782218ac48746"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "15cb476ceb7da730857b8e94f06161273adb7a3a"
},
{
"fixed": "aa1d8cc0cc500e06b316cd6732d4e6c1388fe33c"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "bf1e8c21f2bef7dfcdadc93b0bb2e8723639d5f7"
},
{
"fixed": "f8e960be923f74a273c62478c9cab9523936752b"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "ab58fe210c40e582a9fd3d122ae21071adb5470a"
},
{
"fixed": "326fa14549d7969ef80d3f5beea5470cd1c8e67f"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "4eb4e85c4f818491efc67e9373aa16b123c3f522"
},
{
"fixed": "48f091fd50b2eb33ae5eaea9ed3c4f81603acf38"
}
]
}
],
"versions": [
"v5.15.162",
"v6.1.97",
"v6.1.96",
"v6.6.38",
"v6.6.37",
"v6.6.36",
"v6.9.8",
"v6.9.7"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-42103.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.15.162"
},
{
"fixed": "5.15.163"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.1.96"
},
{
"fixed": "6.1.98"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.6.36"
},
{
"fixed": "6.6.39"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.9.7"
},
{
"fixed": "6.9.9"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-42103.json"
}
}
],
"modified": "2026-10-28T02:30:28.882852684Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/326fa14549d7969ef80d3f5beea5470cd1c8e67f",
"https://git.kernel.org/stable/c/48f091fd50b2eb33ae5eaea9ed3c4f81603acf38",
"https://git.kernel.org/stable/c/522b39bd7163e8dc49f8cf10b9b782218ac48746",
"https://git.kernel.org/stable/c/aa1d8cc0cc500e06b316cd6732d4e6c1388fe33c",
"https://git.kernel.org/stable/c/f8e960be923f74a273c62478c9cab9523936752b",
"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42103.json",
"https://nvd.nist.gov/vuln/detail/CVE-2024-42103",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42103.json"
}
},
"related_cves": [
{
"value": "CVE-2024-42103",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 495563,
"published_at": "2024-07-30T07:45:59.22+00:00"
}