# CVE-2022-49147: block: Fix the maximum minor value is blk_alloc_ext_minor()

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.26%, higher than 19% of CVEs (2026-12-01)
- Published: 2025-02-26T01:55:15.373Z
- Modified: 2026-06-17T05:17:12.827Z
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from 22ae8ce8b89241c94ac00c237752c0ffa37ba5ae before 5b9ac3727e4abb11c9cfbe9c0781fc05dfdd7cfb; from 22ae8ce8b89241c94ac00c237752c0ffa37ba5ae before 0f8cf8f5ccbad25ed6828875b222dbab29d5c272; from 22ae8ce8b89241c94ac00c237752c0ffa37ba5ae before fbe2cc4525480ddd20c866bb5c0578071e01451a; from 22ae8ce8b89241c94ac00c237752c0ffa37ba5ae before d1868328dec5ae2cf210111025fcbc71f78dd5ca; 5.11 (not affected: before 5.11; from 5.15.33 up to 5.15.*; from 5.16.19 up to 5.16.*; from 5.17.2 up to 5.17.*; from 5.18 up to *)
- linux linux_kernel: from 5.11 before 5.15.33; from 5.16 before 5.16.19; from 5.17 before 5.17.2

## References

- <https://git.kernel.org/stable/c/5b9ac3727e4abb11c9cfbe9c0781fc05dfdd7cfb> (patch)
- <https://git.kernel.org/stable/c/0f8cf8f5ccbad25ed6828875b222dbab29d5c272> (patch)
- <https://git.kernel.org/stable/c/fbe2cc4525480ddd20c866bb5c0578071e01451a> (patch)
- <https://git.kernel.org/stable/c/d1868328dec5ae2cf210111025fcbc71f78dd5ca> (patch)

## Sources

- CVE List: [CVE-2022-49147](https://www.cve.org/CVERecord?id=CVE-2022-49147), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2022-49147](https://nvd.nist.gov/vuln/detail/CVE-2022-49147), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-49147 · Whole record: https://cve.day/CVE-2022-49147.json · Rebuilt by cve.day 2026-11-25T22:58:20.220Z
