md/raid5: validate payload size before calculating payload_len
- State
- Published
- Severity
- Not Scored
- Published
- Nov 30, 2026
- Updated
- Nov 30, 2026
- Reserved
- Nov 30, 2026
Description
In the Linux kernel, the following vulnerability has been resolved:
md/raid5: validate payload size before calculating payload_len
Commit b0cc3ae97e89 ("md/raid5: validate payload size before accessing journal metadata") introduced a bounds check to verify that a given payload fits into the current metadata block. In order to calculate the payload size, it has to access the members payload->header.type and payload->size, the offset of which may already be past the end of the metadata block, because the loop condition only checks that the first byte of the payload is inside, and the payload entries have variable sizes. Later on, payload->checksum[0] and payload->checksum[1] are accessed without verifying that payload->size is large enough.
Add another check to make sure that payload->size can be safely accessed, and make sure that the checksum fields are accessible.
This issue has been found by AI (gemma4, Gemini) during a backport review.
| Product | Versions |
|---|---|
| Linux Linux | c96c6f01d84b5c67db1bf1cc8591c0b7146826fc to before 022bee23973a10e19f1cd260825d4bbca63eb3a1 Affectedef4851d8324fd978ca1ff9ec76a275438f887743 to before ff790668336ec161eafa51856424df9c8532335c Affected28d3ff7109c66e99dc1b7cddacb5c760849620ef to before 62fb156158caacd865a6933fbb602597c3053e6f Affected33698bd1b2db9764a29df7751533d33967ff5c98 to before f738b316264276c8456c5e7a706bd3f6ff157122 Affectedc3a1cf78bd1bbb51b2cc5189b4743056553c1e0e to before 5c9a7eea926fdaed105da882e3bf3c5d11ea26f8 Affected73ce72edd113374801045924d4417199963f73a3 to before 9e2913245294f1b8390b8b5ecee67485f18cb432 Affectedb0cc3ae97e893bf54bbce447f4e9fd2e0b88bff9 to before 708060d87b092e107504df4390aa83c4687c445f Affectedb0cc3ae97e893bf54bbce447f4e9fd2e0b88bff9 to before 38c795105992bbaa3418dd39cbff7348ad17537c Affected406aa86394ead347c47428fb51b6359bdaa2257d Affected5.10.258 to before 5.10.275 Affected5.15.209 to before 5.15.226 Affected6.1.175 to before 6.1.193 Affected6.6.140 to before 6.6.163 Affected6.12.86 to before 6.12.117 Affected6.18.27 to before 6.18.63 Affected7.0.4 to before 7.1 Affected |
| Linux Linux | 7.1 Affectedbefore 7.1 Not Affected5.10.275 through 5.10.* Not Affected5.15.226 through 5.15.* Not Affected6.1.193 through 6.1.* Not Affected6.6.163 through 6.6.* Not Affected6.12.117 through 6.12.* Not Affected6.18.63 through 6.18.* Not Affected7.3.4 through 7.3.* Not Affected7.4-rc1 and later Not Affected |
The record has no CVSS score.
Weaknesses
The record names no weakness.
References
- https://git.kernel.org/stable/c/022bee23973a10e19f1cd260825d4bbca63eb3a1
- https://git.kernel.org/stable/c/ff790668336ec161eafa51856424df9c8532335c
- https://git.kernel.org/stable/c/62fb156158caacd865a6933fbb602597c3053e6f
- https://git.kernel.org/stable/c/f738b316264276c8456c5e7a706bd3f6ff157122
- https://git.kernel.org/stable/c/5c9a7eea926fdaed105da882e3bf3c5d11ea26f8
- https://git.kernel.org/stable/c/9e2913245294f1b8390b8b5ecee67485f18cb432
- https://git.kernel.org/stable/c/708060d87b092e107504df4390aa83c4687c445f
- https://git.kernel.org/stable/c/38c795105992bbaa3418dd39cbff7348ad17537c
Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.