CVE-2022-49170
published high CVSS 3.1 · 7.8f2fs: fix to do sanity check on curseg->alloc_type
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux351df4b201157351c7d26bf12c3eeb9dbce98854 to < 498b7088db71f9707359448cd6800bbb1882f4c3 · 351df4b201157351c7d26bf12c3eeb9dbce98854 to < f68caedf264a95c0b02dfd0d9f92ac2637d5848a · 351df4b201157351c7d26bf12c3eeb9dbce98854 to < 0748a0f7dcb9d9dddc80302d73ebcecef6782ef0 · 351df4b201157351c7d26bf12c3eeb9dbce98854 to < c12765e3f129b144421c80d3383df885f85ee290 · 351df4b201157351c7d26bf12c3eeb9dbce98854 to < f41ee8b91c00770d718be2ff4852a80017ae9ab3 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux3.8 (affected) · 0 to < 3.8 (unaffected · semver) · 5.10.110 through 5.10.* (unaffected · semver) · 5.15.33 through 5.15.* (unaffected · semver) · 5.16.19 through 5.16.* (unaffected · semver) · 5.17.2 through 5.17.* (unaffected · semver) · 5.18 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Ubuntu | bionic | block-modules-4.15.0-262-generic-di | Advisory build | 4.15.0-262.274 | USN-9032-1 |
| Ubuntu | bionic | block-modules-5.4.0-242-generic-di | Advisory build | 5.4.0-242.262~18.04.1 | USN-8919-1 |
| Ubuntu | bionic | crypto-modules-4.15.0-262-generic-di | Advisory build | 4.15.0-262.274 | USN-9032-1 |
| Ubuntu | bionic | crypto-modules-5.4.0-242-generic-di | Advisory build | 5.4.0-242.262~18.04.1 | USN-8919-1 |
Show 96 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Ubuntu | bionic | dasd-extra-modules-4.15.0-262-generic-di | Advisory build | 4.15.0-262.274 | USN-9032-1 |
| Ubuntu | bionic | dasd-extra-modules-5.4.0-242-generic-di | Advisory build | 5.4.0-242.262~18.04.1 | USN-8919-1 |
| Ubuntu | bionic | dasd-modules-4.15.0-262-generic-di | Advisory build | 4.15.0-262.274 | USN-9032-1 |
| Ubuntu | bionic | dasd-modules-5.4.0-242-generic-di | Advisory build | 5.4.0-242.262~18.04.1 | USN-8919-1 |
| Ubuntu | bionic | fat-modules-4.15.0-262-generic-di | Advisory build | 4.15.0-262.274 | USN-9032-1 |
| Ubuntu | bionic | fat-modules-5.4.0-242-generic-di | Advisory build | 5.4.0-242.262~18.04.1 | USN-8919-1 |
| Ubuntu | bionic | fb-modules-4.15.0-262-generic-di | Advisory build | 4.15.0-262.274 | USN-9032-1 |
| Ubuntu | bionic | fb-modules-5.4.0-242-generic-di | Advisory build | 5.4.0-242.262~18.04.1 | USN-8919-1 |
| Ubuntu | bionic | firewire-core-modules-4.15.0-262-generic-di | Advisory build | 4.15.0-262.274 | USN-9032-1 |
| Ubuntu | bionic | firewire-core-modules-5.4.0-242-generic-di | Advisory build | 5.4.0-242.262~18.04.1 | USN-8919-1 |
| Ubuntu | bionic | floppy-modules-4.15.0-262-generic-di | Advisory build | 4.15.0-262.274 | USN-9032-1 |
| Ubuntu | bionic | floppy-modules-5.4.0-242-generic-di | Advisory build | 5.4.0-242.262~18.04.1 | USN-8919-1 |
| Ubuntu | bionic | fs-core-modules-4.15.0-262-generic-di | Advisory build | 4.15.0-262.274 | USN-9032-1 |
| Ubuntu | bionic | fs-core-modules-5.4.0-242-generic-di | Advisory build | 5.4.0-242.262~18.04.1 | USN-8919-1 |
| Ubuntu | bionic | fs-secondary-modules-4.15.0-262-generic-di | Advisory build | 4.15.0-262.274 | USN-9032-1 |
| Ubuntu | bionic | fs-secondary-modules-5.4.0-242-generic-di | Advisory build | 5.4.0-242.262~18.04.1 | USN-8919-1 |
| Ubuntu | bionic | input-modules-4.15.0-262-generic-di | Advisory build | 4.15.0-262.274 | USN-9032-1 |
| Ubuntu | bionic | input-modules-5.4.0-242-generic-di | Advisory build | 5.4.0-242.262~18.04.1 | USN-8919-1 |
| Ubuntu | bionic | ipmi-modules-4.15.0-262-generic-di | Advisory build | 4.15.0-262.274 | USN-9032-1 |
| Ubuntu | bionic | ipmi-modules-5.4.0-242-generic-di | Advisory build | 5.4.0-242.262~18.04.1 | USN-8919-1 |
| Ubuntu | bionic | irda-modules-4.15.0-262-generic-di | Advisory build | 4.15.0-262.274 | USN-9032-1 |
| Ubuntu | bionic | kernel-image-4.15.0-262-generic-di | Advisory build | 4.15.0-262.274 | USN-9032-1 |
| Ubuntu | bionic | kernel-image-5.4.0-242-generic-di | Advisory build | 5.4.0-242.262~18.04.1 | USN-8919-1 |
| Ubuntu | bionic | linux | Advisory build | 4.15.0-262.274 | USN-9032-1 |
| Ubuntu | bionic | linux-aws | Advisory build | 4.15.0-1199.212 | USN-9032-1 |
| Ubuntu | bionic | linux-aws-5.4 | Advisory build | 5.4.0-1165.176~18.04.1 | USN-8920-1 |
| Ubuntu | bionic | linux-aws-5.4-cloud-tools-5.4.0-1165 | Advisory build | 5.4.0-1165.176~18.04.1 | USN-8920-1 |
| Ubuntu | bionic | linux-aws-5.4-headers-5.4.0-1165 | Advisory build | 5.4.0-1165.176~18.04.1 | USN-8920-1 |
| Ubuntu | bionic | linux-aws-5.4-tools-5.4.0-1165 | Advisory build | 5.4.0-1165.176~18.04.1 | USN-8920-1 |
| Ubuntu | bionic | linux-aws-cloud-tools-4.15.0-1199 | Advisory build | 4.15.0-1199.212 | USN-9032-1 |
| Ubuntu | bionic | linux-aws-fips | Advisory build | 4.15.0-2137.143 | USN-9032-1 |
| Ubuntu | bionic | linux-aws-fips-headers-4.15.0-2137 | Advisory build | 4.15.0-2137.143 | USN-9032-1 |
| Ubuntu | bionic | linux-aws-fips-tools-4.15.0-2137 | Advisory build | 4.15.0-2137.143 | USN-9032-1 |
| Ubuntu | bionic | linux-aws-headers-4.15.0-1199 | Advisory build | 4.15.0-1199.212 | USN-9032-1 |
| Ubuntu | bionic | linux-aws-tools-4.15.0-1199 | Advisory build | 4.15.0-1199.212 | USN-9032-1 |
| Ubuntu | bionic | linux-azure-4.15 | Advisory build | 4.15.0-1209.224 | USN-9032-1 |
| Ubuntu | bionic | linux-azure-4.15-cloud-tools-4.15.0-1209 | Advisory build | 4.15.0-1209.224 | USN-9032-1 |
| Ubuntu | bionic | linux-azure-4.15-headers-4.15.0-1209 | Advisory build | 4.15.0-1209.224 | USN-9032-1 |
| Ubuntu | bionic | linux-azure-4.15-tools-4.15.0-1209 | Advisory build | 4.15.0-1209.224 | USN-9032-1 |
| Ubuntu | bionic | linux-azure-5.4 | Advisory build | 5.4.0-1170.176~18.04.1 | USN-8919-1 |
| Ubuntu | bionic | linux-azure-5.4-cloud-tools-5.4.0-1170 | Advisory build | 5.4.0-1170.176~18.04.1 | USN-8919-1 |
| Ubuntu | bionic | linux-azure-5.4-headers-5.4.0-1170 | Advisory build | 5.4.0-1170.176~18.04.1 | USN-8919-1 |
| Ubuntu | bionic | linux-azure-5.4-tools-5.4.0-1170 | Advisory build | 5.4.0-1170.176~18.04.1 | USN-8919-1 |
| Ubuntu | bionic | linux-azure-fips | Advisory build | 4.15.0-2117.123 | USN-9032-1 |
| Ubuntu | bionic | linux-azure-fips-cloud-tools-4.15.0-2117 | Advisory build | 4.15.0-2117.123 | USN-9032-1 |
| Ubuntu | bionic | linux-azure-fips-headers-4.15.0-2117 | Advisory build | 4.15.0-2117.123 | USN-9032-1 |
| Ubuntu | bionic | linux-azure-fips-tools-4.15.0-2117 | Advisory build | 4.15.0-2117.123 | USN-9032-1 |
| Ubuntu | bionic | linux-buildinfo-4.15.0-1154-fips | Advisory build | 4.15.0-1154.166 | USN-9032-1 |
| Ubuntu | bionic | linux-buildinfo-4.15.0-1161-oracle | Advisory build | 4.15.0-1161.172 | USN-9032-1 |
| Ubuntu | bionic | linux-buildinfo-4.15.0-1181-kvm | Advisory build | 4.15.0-1181.186 | USN-9032-1 |
| Ubuntu | bionic | linux-buildinfo-4.15.0-1192-gcp | Advisory build | 4.15.0-1192.209 | USN-9032-1 |
| Ubuntu | bionic | linux-buildinfo-4.15.0-1199-aws | Advisory build | 4.15.0-1199.212 | USN-9032-1 |
| Ubuntu | bionic | linux-buildinfo-4.15.0-1209-azure | Advisory build | 4.15.0-1209.224 | USN-9032-1 |
| Ubuntu | bionic | linux-buildinfo-4.15.0-2100-gcp-fips | Advisory build | 4.15.0-2100.106 | USN-9032-1 |
| Ubuntu | bionic | linux-buildinfo-4.15.0-2117-azure-fips | Advisory build | 4.15.0-2117.123 | USN-9032-1 |
| Ubuntu | bionic | linux-buildinfo-4.15.0-2137-aws-fips | Advisory build | 4.15.0-2137.143 | USN-9032-1 |
| Ubuntu | bionic | linux-buildinfo-4.15.0-262-generic | Advisory build | 4.15.0-262.274 | USN-9032-1 |
| Ubuntu | bionic | linux-buildinfo-4.15.0-262-lowlatency | Advisory build | 4.15.0-262.274 | USN-9032-1 |
| Ubuntu | bionic | linux-buildinfo-5.4.0-1111-ibm | Advisory build | 5.4.0-1111.116~18.04.1 | USN-8920-1 |
| Ubuntu | bionic | linux-buildinfo-5.4.0-1148-raspi | Advisory build | 5.4.0-1148.161~18.04.1 | USN-8919-1 |
| Ubuntu | bionic | linux-buildinfo-5.4.0-1163-oracle | Advisory build | 5.4.0-1163.173~18.04.1 | USN-8919-1 |
| Ubuntu | bionic | linux-buildinfo-5.4.0-1165-aws | Advisory build | 5.4.0-1165.176~18.04.1 | USN-8920-1 |
| Ubuntu | bionic | linux-buildinfo-5.4.0-1168-gcp | Advisory build | 5.4.0-1168.178~18.04.1 | USN-8919-1 |
| Ubuntu | bionic | linux-buildinfo-5.4.0-1170-azure | Advisory build | 5.4.0-1170.176~18.04.1 | USN-8919-1 |
| Ubuntu | bionic | linux-buildinfo-5.4.0-242-generic | Advisory build | 5.4.0-242.262~18.04.1 | USN-8919-1 |
| Ubuntu | bionic | linux-buildinfo-5.4.0-242-lowlatency | Advisory build | 5.4.0-242.262~18.04.1 | USN-8919-1 |
| Ubuntu | bionic | linux-cloud-tools-4.15.0-1199-aws | Advisory build | 4.15.0-1199.212 | USN-9032-1 |
| Ubuntu | bionic | linux-cloud-tools-4.15.0-1209-azure | Advisory build | 4.15.0-1209.224 | USN-9032-1 |
| Ubuntu | bionic | linux-cloud-tools-4.15.0-2117-azure-fips | Advisory build | 4.15.0-2117.123 | USN-9032-1 |
| Ubuntu | bionic | linux-cloud-tools-4.15.0-262 | Advisory build | 4.15.0-262.274 | USN-9032-1 |
| Ubuntu | bionic | linux-cloud-tools-4.15.0-262-generic | Advisory build | 4.15.0-262.274 | USN-9032-1 |
| Ubuntu | bionic | linux-cloud-tools-4.15.0-262-lowlatency | Advisory build | 4.15.0-262.274 | USN-9032-1 |
| Ubuntu | bionic | linux-cloud-tools-5.4.0-1165-aws | Advisory build | 5.4.0-1165.176~18.04.1 | USN-8920-1 |
| Ubuntu | bionic | linux-cloud-tools-5.4.0-1170-azure | Advisory build | 5.4.0-1170.176~18.04.1 | USN-8919-1 |
| Ubuntu | bionic | linux-cloud-tools-5.4.0-242-generic | Advisory build | 5.4.0-242.262~18.04.1 | USN-8919-1 |
| Ubuntu | bionic | linux-cloud-tools-5.4.0-242-lowlatency | Advisory build | 5.4.0-242.262~18.04.1 | USN-8919-1 |
| Ubuntu | bionic | linux-cloud-tools-common | Advisory build | 4.15.0-262.274 | USN-9032-1 |
| Ubuntu | bionic | linux-fips | Advisory build | 4.15.0-1154.166 | USN-9032-1 |
| Ubuntu | bionic | linux-fips-headers-4.15.0-1154 | Advisory build | 4.15.0-1154.166 | USN-9032-1 |
| Ubuntu | bionic | linux-fips-tools-4.15.0-1154 | Advisory build | 4.15.0-1154.166 | USN-9032-1 |
| Ubuntu | bionic | linux-fips-tools-host | Advisory build | 4.15.0-1154.166 | USN-9032-1 |
| Ubuntu | bionic | linux-gcp-4.15 | Advisory build | 4.15.0-1192.209 | USN-9032-1 |
| Ubuntu | bionic | linux-gcp-4.15-headers-4.15.0-1192 | Advisory build | 4.15.0-1192.209 | USN-9032-1 |
| Ubuntu | bionic | linux-gcp-4.15-tools-4.15.0-1192 | Advisory build | 4.15.0-1192.209 | USN-9032-1 |
| Ubuntu | bionic | linux-gcp-5.4 | Advisory build | 5.4.0-1168.178~18.04.1 | USN-8919-1 |
| Ubuntu | bionic | linux-gcp-5.4-headers-5.4.0-1168 | Advisory build | 5.4.0-1168.178~18.04.1 | USN-8919-1 |
| Ubuntu | bionic | linux-gcp-5.4-tools-5.4.0-1168 | Advisory build | 5.4.0-1168.178~18.04.1 | USN-8919-1 |
| Ubuntu | bionic | linux-gcp-fips | Advisory build | 4.15.0-2100.106 | USN-9032-1 |
| Ubuntu | bionic | linux-gcp-fips-headers-4.15.0-2100 | Advisory build | 4.15.0-2100.106 | USN-9032-1 |
| Ubuntu | bionic | linux-gcp-fips-tools-4.15.0-2100 | Advisory build | 4.15.0-2100.106 | USN-9032-1 |
| Ubuntu | bionic | linux-headers-4.15.0-1154-fips | Advisory build | 4.15.0-1154.166 | USN-9032-1 |
| Ubuntu | bionic | linux-headers-4.15.0-1161-oracle | Advisory build | 4.15.0-1161.172 | USN-9032-1 |
| Ubuntu | bionic | linux-headers-4.15.0-1181-kvm | Advisory build | 4.15.0-1181.186 | USN-9032-1 |
| Ubuntu | bionic | linux-headers-4.15.0-1192-gcp | Advisory build | 4.15.0-1192.209 | USN-9032-1 |
| Ubuntu | bionic | linux-headers-4.15.0-1199-aws | Advisory build | 4.15.0-1199.212 | USN-9032-1 |
| Ubuntu | bionic | linux-headers-4.15.0-1209-azure | Advisory build | 4.15.0-1209.224 | USN-9032-1 |
Package entries are limited to the first 100 builds and 100 linked advisories.
Description
In the Linux kernel, the following vulnerability has been resolved: f2fs: fix to do sanity check on curseg->alloc_type As Wenqing Liu reported in bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=215657 - Overview UBSAN: array-index-out-of-bounds in fs/f2fs/segment.c:3460:2 when mount and operate a corrupted image - Reproduce tested on kernel 5.17-rc4, 5.17-rc6 1. mkdir test_crash 2. cd test_crash 3. unzip tmp2.zip 4. mkdir mnt 5. ./single_test.sh f2fs 2 - Kernel dump [ 46.434454] loop0: detected capacity change from 0 to 131072 [ 46.529839] F2FS-fs (loop0): Mounted with checkpoint version = 7548c2d9 [ 46.738319] ================================================================================ [ 46.738412] UBSAN: array-index-out-of-bounds in fs/f2fs/segment.c:3460:2 [ 46.738475] index 231 is out of range for type 'unsigned int [2]' [ 46.738539] CPU: 2 PID: 939 Comm: umount Not tainted 5.17.0-rc6 #1 [ 46.738547] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-1ubuntu1.1 04/01/2014 [ 46.738551] Call Trace: [ 46.738556] <TASK> [ 46.738563] dump_stack_lvl+0x47/0x5c [ 46.738581] ubsan_epilogue+0x5/0x50 [ 46.738592] __ubsan_handle_out_of_bounds+0x68/0x80 [ 46.738604] f2fs_allocate_data_block+0xdff/0xe60 [f2fs] [ 46.738819] do_write_page+0xef/0x210 [f2fs] [ 46.738934] f2fs_do_write_node_page+0x3f/0x80 [f2fs] [ 46.739038] __write_node_page+0x2b7/0x920 [f2fs] [ 46.739162] f2fs_sync_node_pages+0x943/0xb00 [f2fs] [ 46.739293] f2fs_write_checkpoint+0x7bb/0x1030 [f2fs] [ 46.739405] kill_f2fs_super+0x125/0x150 [f2fs] [ 46.739507] deactivate_locked_super+0x60/0xc0 [ 46.739517] deactivate_super+0x70/0xb0 [ 46.739524] cleanup_mnt+0x11a/0x200 [ 46.739532] __cleanup_mnt+0x16/0x20 [ 46.739538] task_work_run+0x67/0xa0 [ 46.739547] exit_to_user_mode_prepare+0x18c/0x1a0 [ 46.739559] syscall_exit_to_user_mode+0x26/0x40 [ 46.739568] do_syscall_64+0x46/0xb0 [ 46.739584] entry_SYSCALL_64_after_hwframe+0x44/0xae The root cause is we missed to do sanity check on curseg->alloc_type, result in out-of-bound accessing on sbi->block_count[] array, fix it.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.8 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - The bug is reached only through the local f2fs mount/VFS path (mount crafted image → write/sync/umount → f2fs_allocate_data_block → stat_inc_block_count), not via network protocol handlers or packet processing. AC:L - A crafted checkpoint with an invalid curseg alloc_type (unsigned char, attacker-chosen) deterministically causes an out-of-bounds increment of sbi->block_count[] once allocation runs; CONFIG_F2FS_STAT_FS defaults to y and no attacker-uncontrollable race is required. PR:L - After the malicious f2fs volume is mounted (Android/udisks automount of removable media, or shared workstation), an unprivileged local user can trigger allocation via ordinary writes/sync; CAP_SYS_ADMIN is not required on that path (f2fs is not FS_USERNS_MOUNT, but mount itself is not required once the image is already mounted). UI:N - Once the crafted image is present and mounted via automount or delegated mount rights, the attacker drives block allocation themselves through write/sync/umount with no further separate victim action. S:U - Corruption and crash remain within the host kernel’s f2fs/sbi memory authority; this is standard local kernel impact, not a VM escape, IOMMU bypass, or other cross-boundary break. C:H - Attacker-controlled alloc_type indexes past block_count[2] into adjacent f2fs_sb_info fields (pointers, kobjects, locks), which is out-of-bounds memory corruption leverageable for kernel information disclosure under the overestimate-severity rule. I:H - The same OOB is a write primitive (block_count[idx]++), and repeated allocations let the attacker increment a chosen offset many times into critical sbi fields, enabling heap/metadata corruption and control-flow impact. A:H - The reported UBSAN out-of-bounds access in f2fs_allocate_data_block on umount/writeback can oops or panic the kernel when the corrupted sbi fields are later used, yielding a full denial of service.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 351df4b201157351c7d26bf12c3eeb9dbce98854 to < 498b7088db71f9707359448cd6800bbb1882f4c3 (affected · git)351df4b201157351c7d26bf12c3eeb9dbce98854 to < f68caedf264a95c0b02dfd0d9f92ac2637d5848a (affected · git)351df4b201157351c7d26bf12c3eeb9dbce98854 to < 0748a0f7dcb9d9dddc80302d73ebcecef6782ef0 (affected · git)351df4b201157351c7d26bf12c3eeb9dbce98854 to < c12765e3f129b144421c80d3383df885f85ee290 (affected · git)351df4b201157351c7d26bf12c3eeb9dbce98854 to < f41ee8b91c00770d718be2ff4852a80017ae9ab3 (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 3.8 (affected)0 to < 3.8 (unaffected · semver)5.10.110 through 5.10.* (unaffected · semver)5.15.33 through 5.15.* (unaffected · semver)5.16.19 through 5.16.* (unaffected · semver)5.17.2 through 5.17.* (unaffected · semver)5.18 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
5- https://git.kernel.org/stable/c/0748a0f7dcb9d9dddc80302d73ebcecef6782ef0
- https://git.kernel.org/stable/c/498b7088db71f9707359448cd6800bbb1882f4c3
- https://git.kernel.org/stable/c/c12765e3f129b144421c80d3383df885f85ee290
- https://git.kernel.org/stable/c/f41ee8b91c00770d718be2ff4852a80017ae9ab3
- https://git.kernel.org/stable/c/f68caedf264a95c0b02dfd0d9f92ac2637d5848a
Provider assertions
1Linux · cna
f2fs: fix to do sanity check on curseg->alloc_type
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 2b628587f806d0eb4e2808f9e8276c9f042358b5843af7205b8dd65c6249b9b2
- Ingested
- 23 Sep 2026, 08:04:03 UTC
- Source record
- Official CVE record