In the Linux kernel, the following vulnerability has been resolved:
md/raid1: Fix data corruption for degraded array with slow disk
read_balance() will avoid reading from slow disks as much as possible, however, if valid data only lands in slow disks, and a new normal disk is still in recovery, unrecovered data can be read:
raid1readrequest readbalance raid1shouldreadfirst -> return false choosebestrdev -> normal disk is not recovered, return -1 choosebbrdev -> missing the checking of recovery, return the normal disk -> read unrecovered data
Root cause is that the checking of recovery is missing in choosebbrdev(). Hence add such checking to fix the problem.
Also fix similar problem in chooseslowrdev().
[
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/md/raid1.c",
"function": "rdev_readable"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2febf5fdbf5d9a52ddc3e986971c8609b1582d67",
"digest": {
"length": 418.0,
"function_hash": "177810634836277455161305510706914425131"
},
"id": "CVE-2024-45023-0811533c"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/md/raid1.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2febf5fdbf5d9a52ddc3e986971c8609b1582d67",
"digest": {
"line_hashes": [
"71300477605264178427287702535537994612",
"143082169333763230515334663021817850036",
"312728223414370123942101510434613529358",
"245543327760234092871866989127608060660",
"157419869390404880903975196365389938096",
"232053843494194478766858721324896012558",
"189548493610923186517115478863720903603",
"49419923214534737401165150441668877010",
"185462928447742543120141476026638285530",
"145559841931061886397147323479049938884",
"170543397009877132314605015826040292137",
"251763289603387010125679034196472430778",
"165943857987156123315712811707963608916",
"311940923593551704037616942488800192477",
"159226346027823335158479105223132106452",
"40447844947552381626916444253199029697"
],
"threshold": 0.9
},
"id": "CVE-2024-45023-17992fe8"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/md/raid1.c",
"function": "choose_slow_rdev"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c916ca35308d3187c9928664f9be249b22a3a701",
"digest": {
"length": 756.0,
"function_hash": "292183051258975641154502955806845863121"
},
"id": "CVE-2024-45023-7889bfc7"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/md/raid1.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c916ca35308d3187c9928664f9be249b22a3a701",
"digest": {
"line_hashes": [
"71300477605264178427287702535537994612",
"143082169333763230515334663021817850036",
"312728223414370123942101510434613529358",
"245543327760234092871866989127608060660",
"157419869390404880903975196365389938096",
"232053843494194478766858721324896012558",
"189548493610923186517115478863720903603",
"49419923214534737401165150441668877010",
"185462928447742543120141476026638285530",
"145559841931061886397147323479049938884",
"170543397009877132314605015826040292137",
"251763289603387010125679034196472430778",
"165943857987156123315712811707963608916",
"311940923593551704037616942488800192477",
"159226346027823335158479105223132106452",
"40447844947552381626916444253199029697"
],
"threshold": 0.9
},
"id": "CVE-2024-45023-7ef01a08"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/md/raid1.c",
"function": "rdev_readable"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c916ca35308d3187c9928664f9be249b22a3a701",
"digest": {
"length": 418.0,
"function_hash": "177810634836277455161305510706914425131"
},
"id": "CVE-2024-45023-86f03359"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/md/raid1.c",
"function": "choose_bb_rdev"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2febf5fdbf5d9a52ddc3e986971c8609b1582d67",
"digest": {
"length": 651.0,
"function_hash": "287638209535952510677378175072104055197"
},
"id": "CVE-2024-45023-bc4804ab"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/md/raid1.c",
"function": "choose_slow_rdev"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2febf5fdbf5d9a52ddc3e986971c8609b1582d67",
"digest": {
"length": 756.0,
"function_hash": "292183051258975641154502955806845863121"
},
"id": "CVE-2024-45023-cc3f1f85"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/md/raid1.c",
"function": "choose_bb_rdev"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c916ca35308d3187c9928664f9be249b22a3a701",
"digest": {
"length": 651.0,
"function_hash": "287638209535952510677378175072104055197"
},
"id": "CVE-2024-45023-ec3a8fc2"
}
]