[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025022608-CVE-2022-49147-7f2f@gregkh>
Date: Wed, 26 Feb 2025 02:55:52 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: CVE-2022-49147: block: Fix the maximum minor value is blk_alloc_ext_minor()
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.
The Linux kernel CVE team has assigned CVE-2022-49147 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.11 with commit 22ae8ce8b89241c94ac00c237752c0ffa37ba5ae and fixed in 5.15.33 with commit 5b9ac3727e4abb11c9cfbe9c0781fc05dfdd7cfb
Issue introduced in 5.11 with commit 22ae8ce8b89241c94ac00c237752c0ffa37ba5ae and fixed in 5.16.19 with commit 0f8cf8f5ccbad25ed6828875b222dbab29d5c272
Issue introduced in 5.11 with commit 22ae8ce8b89241c94ac00c237752c0ffa37ba5ae and fixed in 5.17.2 with commit fbe2cc4525480ddd20c866bb5c0578071e01451a
Issue introduced in 5.11 with commit 22ae8ce8b89241c94ac00c237752c0ffa37ba5ae and fixed in 5.18 with commit d1868328dec5ae2cf210111025fcbc71f78dd5ca
Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to
older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2022-49147
will be updated if fixes are backported, please check that for the most
up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
block/genhd.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes. Individual
changes are never tested alone, but rather are part of a larger kernel
release. Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all. If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
https://git.kernel.org/stable/c/5b9ac3727e4abb11c9cfbe9c0781fc05dfdd7cfb
https://git.kernel.org/stable/c/0f8cf8f5ccbad25ed6828875b222dbab29d5c272
https://git.kernel.org/stable/c/fbe2cc4525480ddd20c866bb5c0578071e01451a
https://git.kernel.org/stable/c/d1868328dec5ae2cf210111025fcbc71f78dd5ca
Powered by blists - more mailing lists