CVE-2024-41023

Source
https://cve.org/CVERecord?id=CVE-2024-41023
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-41023.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-41023
Downstream
AZL (2)
BELL (1)
CLSA (1)
DEBIAN (1)
ECHO (1)
OESA (4)
RHSA (5)
RLSA (1)
ROOT (3)
SUSE (11)
UBUNTU (1)
Related
Published
2024-07-29T14:31:40Z
Modified
2026-10-08T02:48:33Z
Summary
sched/deadline: Fix task_struct reference leak
Details

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

sched/deadline: Fix task_struct reference leak

During the execution of the following stress test with linux-rt:

stress-ng --cyclic 30 --timeout 30 --minimize --quiet

kmemleak frequently reported a memory leak concerning the task_struct:

unreferenced object 0xffff8881305b8000 (size 16136): comm "stress-ng", pid 614, jiffies 4294883961 (age 286.412s) object hex dump (first 32 bytes): 02 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .@.............. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ debug hex dump (first 16 bytes): 53 09 00 00 00 00 00 00 00 00 00 00 00 00 00 00 S............... backtrace: [<00000000046b6790>] dup_task_struct+0x30/0x540 [<00000000c5ca0f0b>] copy_process+0x3d9/0x50e0 [<00000000ced59777>] kernel_clone+0xb0/0x770 [<00000000a50befdc>] __do_sys_clone+0xb6/0xf0 [<000000001dbf2008>] do_syscall_64+0x5d/0xf0 [<00000000552900ff>] entry_SYSCALL_64_after_hwframe+0x6e/0x76

The issue occurs in start_dl_timer(), which increments the task_struct reference count and sets a timer. The timer callback, dl_task_timer, is supposed to decrement the reference count upon expiration. However, if enqueue_task_dl() is called before the timer expires and cancels it, the reference count is not decremented, leading to the leak.

This patch fixes the reference leak by ensuring the task_struct reference count is properly decremented when the timer is canceled.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/41xxx/CVE-2024-41023.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
feff2e65efd8d84cf831668e182b2ce73c604bbb
Fixed
7a54d31face626f62de415ebe77b43f76c3ffaf4
Fixed
b58652db66c910c2245f5bee7deca41c12d707b9
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
4.19.257
Fixed
4.20
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
5.4.212
Fixed
5.5
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
f0e1c1d8ff908a39dd42e723d08f104505dfa601
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
184c8ab5342450c4ae6fc5d937f9bb06c620dcf1

Affected versions

v4.*
v4.19.257
v4.19.258
v4.19.259
v4.19.260
v4.19.261
v4.19.262
v4.19.263
v4.19.264
v4.19.265
v4.19.266
v4.19.267
v4.19.268
v4.19.269
v4.19.270
v4.19.271
v4.19.272
v4.19.273
v4.19.274
v4.19.275
v4.19.276
v4.19.277
v4.19.278
v4.19.279
v4.19.280
v4.19.281
v4.19.282
v4.19.283
v4.19.284
v4.19.285
v4.19.286
v4.19.287
v4.19.288
v4.19.289
v4.19.290
v4.19.291
v4.19.292
v4.19.293
v4.19.294
v4.19.295
v4.19.296
v4.19.297
v4.19.298
v4.19.299
v4.19.300
v4.19.301
v4.19.302
v4.19.303
v4.19.304
v4.19.305
v4.19.306
v4.19.307
v4.19.308
v4.19.309
v4.19.310
v4.19.311
v4.19.312
v4.19.313
v4.19.314
v4.19.315
v4.19.316
v4.19.317
v4.19.318
v4.19.319
v4.19.320
v4.19.321
v4.19.322
v4.19.323
v4.19.324
v4.19.325
v5.*
v5.4.212
v5.4.213
v5.4.214
v5.4.215
v5.4.216
v5.4.217
v5.4.218
v5.4.219
v5.4.220
v5.4.221
v5.4.222
v5.4.223
v5.4.224
v5.4.225
v5.4.226
v5.4.227
v5.4.228
v5.4.229
v5.4.230
v5.4.231
v5.4.232
v5.4.233
v5.4.234
v5.4.235
v5.4.236
v5.4.237
v5.4.238
v5.4.239
v5.4.240
v5.4.241
v5.4.242
v5.4.243
v5.4.244
v5.4.245
v5.4.246
v5.4.247
v5.4.248
v5.4.249
v5.4.250
v5.4.251
v5.4.252
v5.4.253
v5.4.254
v5.4.255
v5.4.256
v5.4.257
v5.4.258
v5.4.259
v5.4.260
v5.4.261
v5.4.262
v5.4.263
v5.4.264
v5.4.265
v5.4.266
v5.4.267
v5.4.268
v5.4.269
v5.4.270
v5.4.271
v5.4.272
v5.4.273
v5.4.274
v5.4.275
v5.4.276
v5.4.277
v5.4.278
v5.4.279
v5.4.280
v5.4.281
v5.4.282
v5.4.283
v5.4.284
v5.4.285
v5.4.286
v5.4.287
v5.4.288
v5.4.289
v5.4.290
v5.4.291
v5.4.292
v5.4.293
v5.4.294
v5.4.295
v5.4.296
v5.4.297
v5.4.298
v5.4.299
v5.4.300
v5.4.301
v5.4.302

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-41023.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.10.0
Fixed
6.9.10

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-41023.json"