CVE-2022-48664

See a problem?
Source
https://nvd.nist.gov/vuln/detail/CVE-2022-48664
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-48664.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-48664
Related
Published
2024-04-28T13:15:08Z
Modified
2024-09-18T03:22:32.332894Z
Summary
[none]
Details

In the Linux kernel, the following vulnerability has been resolved:

btrfs: fix hang during unmount when stopping a space reclaim worker

Often when running generic/562 from fstests we can hang during unmount, resulting in a trace like this:

Sep 07 11:52:00 debian9 unknown: run fstests generic/562 at 2022-09-07 11:52:00 Sep 07 11:55:32 debian9 kernel: INFO: task umount:49438 blocked for more than 120 seconds. Sep 07 11:55:32 debian9 kernel: Not tainted 6.0.0-rc2-btrfs-next-122 #1 Sep 07 11:55:32 debian9 kernel: "echo 0 > /proc/sys/kernel/hungtasktimeoutsecs" disables this message. Sep 07 11:55:32 debian9 kernel: task:umount state:D stack: 0 pid:49438 ppid: 25683 flags:0x00004000 Sep 07 11:55:32 debian9 kernel: Call Trace: Sep 07 11:55:32 debian9 kernel: <TASK> Sep 07 11:55:32 debian9 kernel: _schedule+0x3c8/0xec0 Sep 07 11:55:32 debian9 kernel: ? rcureadlockschedheld+0x12/0x70 Sep 07 11:55:32 debian9 kernel: schedule+0x5d/0xf0 Sep 07 11:55:32 debian9 kernel: scheduletimeout+0xf1/0x130 Sep 07 11:55:32 debian9 kernel: ? lockrelease+0x224/0x4a0 Sep 07 11:55:32 debian9 kernel: ? lockacquired+0x1a0/0x420 Sep 07 11:55:32 debian9 kernel: ? tracehardirqson+0x2c/0xd0 Sep 07 11:55:32 debian9 kernel: _waitforcommon+0xac/0x200 Sep 07 11:55:32 debian9 kernel: ? usleeprangestate+0xb0/0xb0 Sep 07 11:55:32 debian9 kernel: _flushwork+0x26d/0x530 Sep 07 11:55:32 debian9 kernel: ? flushworkqueuepreppwqs+0x140/0x140 Sep 07 11:55:32 debian9 kernel: ? traceclocklocal+0xc/0x30 Sep 07 11:55:32 debian9 kernel: _cancelworktimer+0x11f/0x1b0 Sep 07 11:55:32 debian9 kernel: ? closectree+0x12b/0x5b3 [btrfs] Sep 07 11:55:32 debian9 kernel: ? _tracebputs+0x10b/0x170 Sep 07 11:55:32 debian9 kernel: closectree+0x152/0x5b3 [btrfs] Sep 07 11:55:32 debian9 kernel: ? evictinodes+0x166/0x1c0 Sep 07 11:55:32 debian9 kernel: genericshutdownsuper+0x71/0x120 Sep 07 11:55:32 debian9 kernel: killanonsuper+0x14/0x30 Sep 07 11:55:32 debian9 kernel: btrfskillsuper+0x12/0x20 [btrfs] Sep 07 11:55:32 debian9 kernel: deactivatelockedsuper+0x2e/0xa0 Sep 07 11:55:32 debian9 kernel: cleanupmnt+0x100/0x160 Sep 07 11:55:32 debian9 kernel: taskworkrun+0x59/0xa0 Sep 07 11:55:32 debian9 kernel: exittousermodeprepare+0x1a6/0x1b0 Sep 07 11:55:32 debian9 kernel: syscallexittousermode+0x16/0x40 Sep 07 11:55:32 debian9 kernel: dosyscall64+0x48/0x90 Sep 07 11:55:32 debian9 kernel: entrySYSCALL64afterhwframe+0x63/0xcd Sep 07 11:55:32 debian9 kernel: RIP: 0033:0x7fcde59a57a7 Sep 07 11:55:32 debian9 kernel: RSP: 002b:00007ffe914217c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 Sep 07 11:55:32 debian9 kernel: RAX: 0000000000000000 RBX: 00007fcde5ae8264 RCX: 00007fcde59a57a7 Sep 07 11:55:32 debian9 kernel: RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000055b57556cdd0 Sep 07 11:55:32 debian9 kernel: RBP: 000055b57556cba0 R08: 0000000000000000 R09: 00007ffe91420570 Sep 07 11:55:32 debian9 kernel: R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 Sep 07 11:55:32 debian9 kernel: R13: 000055b57556cdd0 R14: 000055b57556ccb8 R15: 0000000000000000 Sep 07 11:55:32 debian9 kernel: </TASK>

What happens is the following:

1) The cleaner kthread tries to start a transaction to delete an unused block group, but the metadata reservation can not be satisfied right away, so a reservation ticket is created and it starts the async metadata reclaim task (fsinfo->asyncreclaim_work);

2) Writeback for all the filler inodes with an isize of 2K starts (generic/562 creates a lot of 2K files with the goal of filling metadata space). We try to create an inline extent for them, but we fail when trying to insert the inline extent with -ENOSPC (at cowfilerangeinline()) - since this is not critical, we fallback to non-inline mode (back to cowfilerange()), reserve extents ---truncated---

References

Affected packages

Debian:11 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.10.148-1

Affected versions

5.*

5.10.46-4
5.10.46-5
5.10.70-1~bpo10+1
5.10.70-1
5.10.84-1
5.10.92-1~bpo10+1
5.10.92-1
5.10.92-2
5.10.103-1~bpo10+1
5.10.103-1
5.10.106-1
5.10.113-1
5.10.120-1~bpo10+1
5.10.120-1
5.10.127-1
5.10.127-2~bpo10+1
5.10.127-2
5.10.136-1
5.10.140-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:12 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.0.2-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:13 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.0.2-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}