CVE-2022-49147

block: Fix the maximum minor value is blk_alloc_ext_minor()

MEDIUM
5.5
CVSS Score
Published: February 26, 2025 at 01:55 AM UTC
Updated: June 17, 2026 at 05:17 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: block: Fix the maximum minor value is blk_alloc_ext_minor() ida_alloc_range(..., min, max, ...) returns values from min to max, inclusive. So, NR_EXT_DEVT is a valid idx returned by blk_alloc_ext_minor(). This is an issue because in device_add_disk(), this value is used in: ddev->devt = MKDEV(disk->major, disk->first_minor); and NR_EXT_DEVT is '(1 << MINORBITS)'. So, should 'disk->first_minor' be NR_EXT_DEVT, it would overflow.

Affected

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

5.11 ≤ v < 5.15.335.11 ≤ v < 5.16.195.11 ≤ v < 5.17.25.11 ≤ v < 5.185.16 ≤ v < 5.16.195.17 ≤ v < 5.17.222ae8ce8b89241c94ac00c237752c0ffa37ba5ae5.11
Vendor states this is fixed in 0f8cf8f5ccbad25ed6828875b222dbab29d5c272 (fixed)
Vendor states this is fixed in 5b9ac3727e4abb11c9cfbe9c0781fc05dfdd7cfb (fixed)
Vendor states this is fixed in d1868328dec5ae2cf210111025fcbc71f78dd5ca (fixed)
Vendor states this is fixed in fbe2cc4525480ddd20c866bb5c0578071e01451a (fixed)
Vendor states this is fixed in 5.11 (unaffected)
Vendor states this is fixed in 5.15.33 (unaffected)
Vendor states this is fixed in 5.16.19 (unaffected)
Vendor states this is fixed in 5.17.2 (unaffected)
Vendor states this is fixed in 5.18 (unaffected)

References (4)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/0f8cf8f5ccbad25ed6828875b222dbab29d5c272
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/5b9ac3727e4abb11c9cfbe9c0781fc05dfdd7cfb
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/d1868328dec5ae2cf210111025fcbc71f78dd5ca
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/fbe2cc4525480ddd20c866bb5c0578071e01451a

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