CVE-2022-49738

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-49738
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49738.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-49738
Related
Published
2025-03-27T17:15:38Z
Modified
2025-04-14T23:00:55.703805Z
Severity
  • 7.1 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H CVSS Calculator
Summary
[none]
Details

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

f2fs: fix to do sanity check on iextraisize in is_alive()

syzbot found a f2fs bug:

BUG: KASAN: slab-out-of-bounds in datablkaddr fs/f2fs/f2fs.h:2891 [inline] BUG: KASAN: slab-out-of-bounds in isalive fs/f2fs/gc.c:1117 [inline] BUG: KASAN: slab-out-of-bounds in gcdatasegment fs/f2fs/gc.c:1520 [inline] BUG: KASAN: slab-out-of-bounds in dogarbagecollect+0x386a/0x3df0 fs/f2fs/gc.c:1734 Read of size 4 at addr ffff888076557568 by task kworker/u4:3/52

CPU: 1 PID: 52 Comm: kworker/u4:3 Not tainted 6.1.0-rc4-syzkaller-00362-gfef7fd48922d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Workqueue: writeback wbworkfn (flush-7:0) Call Trace: <TASK> _dumpstack lib/dumpstack.c:88 [inline] dumpstacklvl+0xcd/0x134 lib/dumpstack.c:106 printaddressdescription mm/kasan/report.c:284 [inline] printreport+0x15e/0x45d mm/kasan/report.c:395 kasanreport+0xbb/0x1f0 mm/kasan/report.c:495 datablkaddr fs/f2fs/f2fs.h:2891 [inline] isalive fs/f2fs/gc.c:1117 [inline] gcdatasegment fs/f2fs/gc.c:1520 [inline] dogarbagecollect+0x386a/0x3df0 fs/f2fs/gc.c:1734 f2fsgc+0x88c/0x20a0 fs/f2fs/gc.c:1831 f2fsbalancefs+0x544/0x6b0 fs/f2fs/segment.c:410 f2fswriteinode+0x57e/0xe20 fs/f2fs/inode.c:753 writeinode fs/fs-writeback.c:1440 [inline] _writebacksingleinode+0xcfc/0x1440 fs/fs-writeback.c:1652 writebacksbinodes+0x54d/0xf90 fs/fs-writeback.c:1870 wbwriteback+0x2c5/0xd70 fs/fs-writeback.c:2044 wbdowriteback fs/fs-writeback.c:2187 [inline] wbworkfn+0x2dc/0x12f0 fs/fs-writeback.c:2227 processonework+0x9bf/0x1710 kernel/workqueue.c:2289 workerthread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e4/0x3a0 kernel/kthread.c:376 retfromfork+0x1f/0x30 arch/x86/entry/entry64.S:306

The root cause is that we forgot to do sanity check on .iextraisize in below path, result in accessing invalid address later, fix it. - gcdatasegment - isalive - datablkaddr - offsetinaddr

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.178-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
5.10.148-1
5.10.149-1
5.10.149-2
5.10.158-1
5.10.158-2
5.10.162-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.1.11-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.1.11-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}