PT-2024-29198 · Linux+8 · Linux Kernel+8

Baokun Li

·

Published

2024-05-09

·

Updated

2026-05-26

·

CVE-2024-40998

CVSS v3.1

5.5

Medium

VectorAV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Name of the Vulnerable Software and Affected Versions Linux kernel (affected versions not specified)
Description The issue arises from the Linux kernel's ext4 file system, where the ratelimit state->lock is accessed before it is initialized in the ext4 fill super() function. This occurs due to a concurrency issue where ext4 register sysfs registers the msg ratelimit interval ms interface, allowing other processes to modify rs->interval to a non-zero value via this interface while rs->lock is still uninitialized. When ext4 msg is called, it triggers the problem by accessing the uninitialized rs->lock. The estimated number of potentially affected devices worldwide is not available. There is no information about real-world incidents where this issue was exploited.
Technical details about exploitation include:
  • The msg ratelimit interval ms interface of sysfs allows modification of rs->interval to a non-zero value.
  • The ratelimit() function does nothing if rs->interval is 0, but if it is non-zero, it attempts to acquire the lock using raw spin trylock irqsave(&rs->lock, flags).
  • The ext4 msg function calls ratelimit() and triggers the problem by accessing the uninitialized rs->lock.
  • The ratelimit state init function initializes sbi->s msg ratelimit state, and raw spin lock init initializes rs->lock, but these initializations occur after the sysfs registration.
Recommendations At the moment, there is no information about a newer version that contains a fix for this vulnerability.

Exploit

DoS

Improper Initialization

Use of Uninitialized Resource

Weakness Enumeration

Related Identifiers

ALSA-2024:7000
ALSA-2024:7001
ALSA-2024:8617
ALSA-2025_16880
AZL-67767
BDU:2026-01446
CESA-2024_7000
CESA-2024_7001
CVE-2024-40998
ECHO-C473-24D2-C522
INFSA-2024_7000
INFSA-2024_7001
INFSA-2024_8617
OESA-2024-2255
OESA-2024-2257
OESA-2025-1432
OPENSUSE-SU-2024_2947-1
RHSA-2024:7000
RHSA-2024:7001
RHSA-2024:8107
RHSA-2024:8613
RHSA-2024:8614
RHSA-2024:8616
RHSA-2024:8617
RHSA-2024_7000
RHSA-2024_7001
RHSA-2024_8617
RLSA-2024:7001
RLSA-2024:8617
SUSE-SU-2024:2802-1
SUSE-SU-2024:2892-1
SUSE-SU-2024:2894-1
SUSE-SU-2024:2896-1
SUSE-SU-2024:2901-1
SUSE-SU-2024:2939-1
SUSE-SU-2024:2940-1
SUSE-SU-2024:2947-1
SUSE-SU-2024:2973-1
SUSE-SU-2025:20008-1
SUSE-SU-2025:20028-1
USN-6999-1
USN-6999-2
USN-7004-1
USN-7005-1
USN-7005-2
USN-7008-1
USN-7029-1

Affected Products

Almalinux
Centos
Debian
Linuxmint
Linux Kernel
Red Hat
Rocky Linux
Suse
Ubuntu