CVE-2022-49993

loop: Check for overflow while configuring loop

MEDIUM
5.5
CVSS Score
Published: June 18, 2025 at 11:00 AM UTC
Updated: June 17, 2026 at 05:19 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.3%

Description

In the Linux kernel, the following vulnerability has been resolved: loop: Check for overflow while configuring loop The userspace can configure a loop using an ioctl call, wherein a configuration of type loop_config is passed (see lo_ioctl()'s case on line 1550 of drivers/block/loop.c). This proceeds to call loop_configure() which in turn calls loop_set_status_from_info() (see line 1050 of loop.c), passing &config->info which is of type loop_info64*. This function then sets the appropriate values, like the offset. loop_device has lo_offset of type loff_t (see line 52 of loop.c), which is typdef-chained to long long, whereas loop_info64 has lo_offset of type __u64 (see line 56 of include/uapi/linux/loop.h). The function directly copies offset from info to the device as follows (See line 980 of loop.c): lo->lo_offset = info->lo_offset; This results in an overflow, which triggers a warning in iomap_iter() due to a call to iomap_iter_done() which has: WARN_ON_ONCE(iter->iomap.offset > iter->pos); Thus, check for negative value during loop_set_status_from_info(). Bug report: https://syzkaller.appspot.com/bug?id=c620fe14aac810396d3c3edc9ad73848bf69a29e

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 4.9.3272.6.12 ≤ v < 4.14.2922.6.12 ≤ v < 4.19.3122.6.12 ≤ v < 4.9.3272.6.12 ≤ v < 5.10.1402.6.12 ≤ v < 5.15.642.6.12 ≤ v < 5.19.62.6.12 ≤ v < 5.4.2742.6.12 ≤ v < 6.04.10 ≤ v < 4.14.2924.15 ≤ v < 4.19.3124.20 ≤ v < 5.4.2745.11 ≤ v < 5.15.645.16 ≤ v < 5.19.65.5 ≤ v < 5.10.1401da177e4c3f41524e886b7f1b8a0c1fc7321cac22.6.126.0 rc16.0 rc2
Vendor states this is fixed in 18e28817cb516b39de6281f6db9b0618b2cc7b42 (fixed)
Vendor states this is fixed in 455bef69028c65065f16bb4635591b2374249b (fixed)
Vendor states this is fixed in 6858933131d0dadac071c4d33335a9ea4b8e76cf (fixed)
Vendor states this is fixed in 9be7fa7ead18a48940df7b59d993bbc8b9055c15 (fixed)
Vendor states this is fixed in a217715338fd48f72114725aa7a40e484a781ca7 (fixed)
Vendor states this is fixed in adf0112d9b8acb03485624220b4934f69bf13369 (fixed)
Vendor states this is fixed in b40877b8562c5720d0a7fce20729f56b75a3dede (fixed)
Vendor states this is fixed in c490a0b5a4f36da3918181a8acdc6991d967c5f3 (fixed)
Vendor states this is fixed in 2.6.12 (unaffected)
Vendor states this is fixed in 4.14.292 (unaffected)
Vendor states this is fixed in 4.19.312 (unaffected)
Vendor states this is fixed in 4.9.327 (unaffected)
Vendor states this is fixed in 5.10.140 (unaffected)
Vendor states this is fixed in 5.15.64 (unaffected)
Vendor states this is fixed in 5.19.6 (unaffected)
Vendor states this is fixed in 5.4.274 (unaffected)
Vendor states this is fixed in 6.0 (unaffected)

References (8)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/0455bef69028c65065f16bb04635591b2374249b
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/18e28817cb516b39de6281f6db9b0618b2cc7b42
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/6858933131d0dadac071c4d33335a9ea4b8e76cf
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/9be7fa7ead18a48940df7b59d993bbc8b9055c15
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/a217715338fd48f72114725aa7a40e484a781ca7
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/adf0112d9b8acb03485624220b4934f69bf13369
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/b40877b8562c5720d0a7fce20729f56b75a3dede
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/c490a0b5a4f36da3918181a8acdc6991d967c5f3

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
NVD-CWE-noinfo

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card