CVE-2024-39476

Updated on 05 Jul 2024

Severity

5.5 Medium severity

Details

CVSS score
5.5
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Overview

About vulnerability

In the Linux kernel, the following vulnerability has been resolved:

md/raid5: fix deadlock that raid5d() wait for itself to clear MD_SB_CHANGE_PENDING

Xiao reported that lvm2 test lvconvert-raid-takeover.sh can hang with small possibility, the root cause is exactly the same as commit bed9e27baf52 (“Revert “md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d””)

However, Dan reported another hang after that, and junxiao investigated the problem and found out that this is caused by plugged bio can’t issue from raid5d().

Current implementation in raid5d() has a weird dependence:

  1. md_check_recovery() from raid5d() must hold ‘reconfig_mutex’ to clear MD_SB_CHANGE_PENDING;
  2. raid5d() handles IO in a deadloop, until all IO are issued;
  3. IO from raid5d() must wait for MD_SB_CHANGE_PENDING to be cleared;

This behaviour is introduce before v2.6, and for consequence, if other context hold ‘reconfig_mutex’, and md_check_recovery() can’t update super_block, then raid5d() will waste one cpu 100% by the deadloop, until ‘reconfig_mutex’ is released.

Refer to the implementation from raid1 and raid10, fix this problem by skipping issue IO if MD_SB_CHANGE_PENDING is still set after md_check_recovery(), daemon thread will be woken up when ‘reconfig_mutex’ is released. Meanwhile, the hang problem will be fixed as well.

Details

Fixes

KernelCare state

Live-patch status from KernelCare for each operating system.

Operating system Status Covered kernels
AlmaLinux 8 Released
15 kernels
  • 4.18.0-477.10.1.el8_8
  • 4.18.0-477.13.1.el8_8
  • 4.18.0-477.15.1.el8_8
  • 4.18.0-477.21.1.el8_8
  • 4.18.0-477.27.1.el8_8
  • 4.18.0-477.27.2.el8_8
  • 4.18.0-513.11.1.el8_9
  • 4.18.0-513.18.1.el8_9
  • 4.18.0-513.18.2.el8_9
  • 4.18.0-513.24.1.el8_9
  • 4.18.0-513.5.1.el8_9
  • 4.18.0-513.9.1.el8_9
  • 4.18.0-553.5.1.el8_10
  • 4.18.0-553.8.1.el8_10
  • 4.18.0-553.el8_10
AlmaLinux 9 Released
18 kernels
  • 5.14.0-284.11.1.el9_2
  • 5.14.0-284.18.1.el9_2
  • 5.14.0-284.25.1.el9_2
  • 5.14.0-284.30.1.el9_2
  • 5.14.0-362.13.1.el9_3
  • 5.14.0-362.18.1.el9_3
  • 5.14.0-362.24.1.el9_3
  • 5.14.0-362.24.2.el9_3
  • 5.14.0-362.8.1.el9_3
  • 5.14.0-427.13.1.el9_4
  • 5.14.0-427.16.1.el9_4
  • 5.14.0-427.18.1.el9_4
  • 5.14.0-427.20.1.el9_4
  • 5.14.0-427.22.1.el9_4
  • 5.14.0-427.24.1.el9_4
  • 5.14.0-427.26.1.el9_4
  • 5.14.0-427.28.1.el9_4
  • 5.14.0-427.31.1.el9_4
Amazon Linux 2 Released
37 kernels
  • 4.14.296-222.539.amzn2
  • 4.14.299-223.520.amzn2
  • 4.14.301-224.520.amzn2
  • 4.14.304-226.531.amzn2
  • 4.14.301-225.528.amzn2
  • 4.14.309-231.529.amzn2
  • 4.14.305-227.531.amzn2
  • 4.14.313-235.533.amzn2
  • 4.14.314-237.533.amzn2
  • 4.14.314-238.539.amzn2
  • 4.14.318-240.529.amzn2
  • 4.14.318-241.531.amzn2
  • 4.14.320-242.534.amzn2
  • 4.14.320-243.544.amzn2
  • 4.14.322-244.536.amzn2
  • 4.14.311-233.529.amzn2
  • 4.14.322-244.539.amzn2
  • 4.14.326-245.539.amzn2
  • 4.14.327-246.539.amzn2
  • 4.14.328-248.540.amzn2
  • 4.14.322-246.539.amzn2
  • 4.14.330-250.540.amzn2
  • 4.14.334-252.552.amzn2
  • 4.14.336-253.554.amzn2
  • 4.14.336-255.557.amzn2
  • 4.14.336-256.559.amzn2
  • 4.14.336-257.562.amzn2
  • 4.14.336-256.557.amzn2
  • 4.14.336-257.568.amzn2
  • 4.14.336-257.566.amzn2
  • 4.14.343-261.564.amzn2
  • 4.14.343-259.562.amzn2
  • 4.14.343-260.564.amzn2
  • 4.14.348-265.562.amzn2
  • 4.14.344-262.563.amzn2
  • 4.14.345-262.561.amzn2
  • 4.14.348-265.565.amzn2
CloudLinux OS 7h Released
23 kernels
  • 4.18.0-477.10.1.lve.1.el7h
  • 4.18.0-477.13.1.lve.1.el7h
  • 4.18.0-477.13.1.lve.el7h
  • 4.18.0-477.15.1.lve.1.el7h
  • 4.18.0-477.15.1.lve.2.el7h
  • 4.18.0-477.21.1.lve.1.el7h
  • 4.18.0-477.21.1.lve.el7h
  • 4.18.0-477.27.1.lve.el7h
  • 4.18.0-477.27.2.lve.el7h
  • 4.18.0-513.11.1.lve.1.el7h
  • 4.18.0-513.11.1.lve.el7h
  • 4.18.0-513.24.1.lve.2.el7h
  • 4.18.0-513.24.1.lve.el7h
  • 4.18.0-513.5.1.lve.el7h
  • 4.18.0-513.9.1.lve.el7h
  • 4.18.0-553.5.1.lve.1.el7h
  • 4.18.0-553.5.1.lve.el7h
  • 4.18.0-553.8.1.lve.el7h
  • 4.18.0-553.lve.el7h
  • 4.18.0-513.18.1.lve.1.el7h
  • 4.18.0-513.18.1.lve.2.el7h
  • 4.18.0-513.18.1.lve.el7h
  • 4.18.0-513.24.1.lve.1.el7h
CloudLinux OS 8 Released
22 kernels
  • 4.18.0-477.10.1.lve.el8
  • 4.18.0-477.13.1.lve.1.el8
  • 4.18.0-477.13.1.lve.el8
  • 4.18.0-477.15.1.lve.2.el8
  • 4.18.0-477.21.1.lve.1.el8
  • 4.18.0-477.21.1.lve.el8
  • 4.18.0-477.27.1.lve.el8
  • 4.18.0-477.27.2.lve.el8
  • 4.18.0-513.11.1.lve.el8
  • 4.18.0-513.18.1.lve.1.el8
  • 4.18.0-513.18.1.lve.2.el8
  • 4.18.0-513.18.1.lve.el8
  • 4.18.0-513.24.1.lve.1.el8
  • 4.18.0-513.24.1.lve.2.el8
  • 4.18.0-513.24.1.lve.el8
  • 4.18.0-513.5.1.lve.el8
  • 4.18.0-513.9.1.lve.el8
  • 4.18.0-544.lve.el8
  • 4.18.0-553.5.1.lve.1.el8
  • 4.18.0-553.5.1.lve.el8
  • 4.18.0-553.8.1.lve.el8
  • 4.18.0-553.lve.el8
Debian 11 Released
7 kernels
  • 5.10.191-1
  • 5.10.197-1
  • 5.10.205-2
  • 5.10.205-1
  • 5.10.209-2
  • 5.10.216-1
  • 5.10.218-1
Debian 11 cloud Released
6 kernels
  • 5.10.191-1
  • 5.10.197-1
  • 5.10.205-2
  • 5.10.209-2
  • 5.10.216-1
  • 5.10.218-1
Oracle Linux 8 Released
17 kernels
  • 4.18.0-477.10.1.el8_8
  • 4.18.0-477.13.1.el8_8
  • 4.18.0-477.15.1.el8_8
  • 4.18.0-477.21.1.el8_8
  • 4.18.0-477.27.0.1.el8_8
  • 4.18.0-477.27.1.el8_8
  • 4.18.0-513.11.0.1.el8_9
  • 4.18.0-513.18.0.1.el8_9
  • 4.18.0-553.8.1.el8_10
  • 4.18.0-553.el8_10
  • 4.18.0-513.18.0.2.el8_9
  • 4.18.0-513.18.1.0.1.el8_9
  • 4.18.0-513.18.1.el8_9
  • 4.18.0-513.24.1.el8_9
  • 4.18.0-513.5.1.el8_9
  • 4.18.0-513.9.1.el8_9
  • 4.18.0-553.5.1.el8_10
Oracle Linux 9 Released
24 kernels
  • 5.14.0-284.11.1.el9_2
  • 5.14.0-284.18.1.el9_2
  • 5.14.0-284.25.1.0.1.el9_2
  • 5.14.0-284.25.1.el9_2
  • 5.14.0-284.30.0.1.el9_2
  • 5.14.0-284.30.1.el9_2
  • 5.14.0-362.13.0.1.el9_3
  • 5.14.0-362.13.1.el9_3
  • 5.14.0-362.18.0.1.el9_3
  • 5.14.0-362.18.0.2.el9_3
  • 5.14.0-362.18.1.el9_3
  • 5.14.0-362.24.1.0.1.el9_3
  • 5.14.0-362.24.1.0.2.el9_3
  • 5.14.0-362.24.1.el9_3
  • 5.14.0-362.8.1.el9_3
  • 5.14.0-427.13.1.el9_4
  • 5.14.0-427.16.1.el9_4
  • 5.14.0-427.18.1.el9_4
  • 5.14.0-427.20.1.el9_4
  • 5.14.0-427.22.1.el9_4
  • 5.14.0-427.24.1.el9_4
  • 5.14.0-427.26.1.el9_4
  • 5.14.0-427.28.1.el9_4
  • 5.14.0-427.31.1.el9_4
RHEL 8 Released
13 kernels
  • 4.18.0-477.10.1.el8_8
  • 4.18.0-477.13.1.el8_8
  • 4.18.0-477.15.1.el8_8
  • 4.18.0-477.21.1.el8_8
  • 4.18.0-477.27.1.el8_8
  • 4.18.0-513.11.1.el8_9
  • 4.18.0-513.18.1.el8_9
  • 4.18.0-513.24.1.el8_9
  • 4.18.0-513.5.1.el8_9
  • 4.18.0-513.9.1.el8_9
  • 4.18.0-553.5.1.el8_10
  • 4.18.0-553.8.1.el8_10
  • 4.18.0-553.el8_10
RHEL 9 Released
17 kernels
  • 5.14.0-362.18.1.el9_3
  • 5.14.0-362.24.1.el9_3
  • 5.14.0-362.8.1.el9_3
  • 5.14.0-427.13.1.el9_4
  • 5.14.0-427.16.1.el9_4
  • 5.14.0-427.18.1.el9_4
  • 5.14.0-427.20.1.el9_4
  • 5.14.0-427.22.1.el9_4
  • 5.14.0-427.24.1.el9_4
  • 5.14.0-427.26.1.el9_4
  • 5.14.0-427.28.1.el9_4
  • 5.14.0-427.31.1.el9_4
  • 5.14.0-284.11.1.el9_2
  • 5.14.0-284.18.1.el9_2
  • 5.14.0-284.25.1.el9_2
  • 5.14.0-284.30.1.el9_2
  • 5.14.0-362.13.1.el9_3
Rocky Linux 8 Released
14 kernels
  • 4.18.0-477.10.1.el8_8
  • 4.18.0-477.13.1.el8_8
  • 4.18.0-477.15.1.el8_8
  • 4.18.0-477.21.1.el8_8
  • 4.18.0-477.27.1.el8_8
  • 4.18.0-513.11.1.el8_9.0.1
  • 4.18.0-513.11.1.el8_9
  • 4.18.0-513.18.1.el8_9
  • 4.18.0-513.24.1.el8_9
  • 4.18.0-513.5.1.el8_9
  • 4.18.0-513.9.1.el8_9
  • 4.18.0-553.5.1.el8_10
  • 4.18.0-553.8.1.el8_10
  • 4.18.0-553.el8_10
Rocky Linux 9 Released
18 kernels
  • 5.14.0-284.30.1.el9_2
  • 5.14.0-362.13.1.el9_3
  • 5.14.0-362.18.1.el9_3.0.1
  • 5.14.0-362.18.1.el9_3
  • 5.14.0-362.24.1.el9_3.0.1
  • 5.14.0-362.24.1.el9_3
  • 5.14.0-362.8.1.el9_3
  • 5.14.0-427.16.1.el9_4
  • 5.14.0-427.18.1.el9_4
  • 5.14.0-427.20.1.el9_4.0.1
  • 5.14.0-427.20.1.el9_4
  • 5.14.0-427.22.1.el9_4
  • 5.14.0-427.24.1.el9_4
  • 5.14.0-427.26.1.el9_4
  • 5.14.0-427.28.1.el9_4
  • 5.14.0-427.31.1.el9_4
  • 5.14.0-284.11.1.el9_2
  • 5.14.0-427.13.1.el9_4