Bug 2360235 (CVE-2025-22124) - CVE-2025-22124 kernel: md/md-bitmap: fix wrong bitmap_limit for clustermd when write sb
Summary: CVE-2025-22124 kernel: md/md-bitmap: fix wrong bitmap_limit for clustermd whe...
Keywords:
Status: NEW
Alias: CVE-2025-22124
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-04-16 15:03 UTC by OSIDB Bzimport
Modified: 2025-04-30 10:13 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-04-16 15:03:51 UTC
In the Linux kernel, the following vulnerability has been resolved:

md/md-bitmap: fix wrong bitmap_limit for clustermd when write sb

In clustermd, separate write-intent-bitmaps are used for each cluster
node:

0                    4k                     8k                    12k
-------------------------------------------------------------------
| idle                | md super            | bm super [0] + bits |
| bm bits[0, contd]   | bm super[1] + bits  | bm bits[1, contd]   |
| bm super[2] + bits  | bm bits [2, contd]  | bm super[3] + bits  |
| bm bits [3, contd]  |                     |                     |

So in node 1, pg_index in __write_sb_page() could equal to
bitmap->storage.file_pages. Then bitmap_limit will be calculated to
0. md_super_write() will be called with 0 size.
That means the first 4k sb area of node 1 will never be updated
through filemap_write_page().
This bug causes hang of mdadm/clustermd_tests/01r1_Grow_resize.

Here use (pg_index % bitmap->storage.file_pages) to make calculation
of bitmap_limit correct.

Comment 1 Avinash Hanwate 2025-04-17 11:55:00 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025041629-CVE-2025-22124-4561@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.