md/raid10: fix divide-by-zero in setup_geo() with zero far_copies
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 475901aff15841fb0a81e7546517407779a9b061 · < 913d556e4bd1b56ed822815655b82c7bb54edc51| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
md/raid10: fix divide-by-zero in setup_geo() with zero far_copies
setup_geo() extracts near_copies (nc) and far_copies (fc) from the user-provided layout parameter without checking for zero. When fc=0 with the "improved" far set layout selected, 'geo->far_set_size = disks / fc' triggers a divide-by-zero.
Validate nc and fc immediately after extraction, returning -1 if either is zero.
From the CVE record · Linux
The Linux kernel’s md/raid10 setup_geo() does not reject a zero far_copies value in a user-provided layout. When the “improved” far set layout is selected with far_copies set to zero, it divides by zero. The input does not specify whether authentication, local access, or user interaction is required.
Engineers running Linux kernels with md/raid10 should check their versions; affected versions are not specified.