CVE-2023-54134

Source
https://cve.org/CVERecord?id=CVE-2023-54134
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-54134.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2023-54134
Downstream
Related
Published
2025-12-24T13:06:50.627Z
Modified
2026-03-31T17:29:54.128188668Z
Summary
autofs: fix memory leak of waitqueues in autofs_catatonic_mode
Details

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

autofs: fix memory leak of waitqueues in autofscatatonicmode

Syzkaller reports a memory leak:

BUG: memory leak unreferenced object 0xffff88810b279e00 (size 96): comm "syz-executor399", pid 3631, jiffies 4294964921 (age 23.870s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 08 9e 27 0b 81 88 ff ff ..........'..... 08 9e 27 0b 81 88 ff ff 00 00 00 00 00 00 00 00 ..'............. backtrace: [<ffffffff814cfc90>] kmalloctrace+0x20/0x90 mm/slabcommon.c:1046 [<ffffffff81bb75ca>] kmalloc include/linux/slab.h:576 [inline] [<ffffffff81bb75ca>] autofswait+0x3fa/0x9a0 fs/autofs/waitq.c:378 [<ffffffff81bb88a7>] autofsdoexpiremulti+0xa7/0x3e0 fs/autofs/expire.c:593 [<ffffffff81bb8c33>] autofsexpiremulti+0x53/0x80 fs/autofs/expire.c:619 [<ffffffff81bb6972>] autofsrootioctlunlocked+0x322/0x3b0 fs/autofs/root.c:897 [<ffffffff81bb6a95>] autofsrootioctl+0x25/0x30 fs/autofs/root.c:910 [<ffffffff81602a9c>] vfsioctl fs/ioctl.c:51 [inline] [<ffffffff81602a9c>] __dosysioctl fs/ioctl.c:870 [inline] [<ffffffff81602a9c>] __sesysioctl fs/ioctl.c:856 [inline] [<ffffffff81602a9c>] __x64sysioctl+0xfc/0x140 fs/ioctl.c:856 [<ffffffff84608225>] dosyscallx64 arch/x86/entry/common.c:50 [inline] [<ffffffff84608225>] dosyscall64+0x35/0xb0 arch/x86/entry/common.c:80 [<ffffffff84800087>] entrySYSCALL64afterhwframe+0x63/0xcd

autofswaitqueue structs should be freed if their wait_ctr becomes zero. Otherwise they will be lost.

In this case an AUTOFSIOCEXPIREMULTI ioctl is done, then a new waitqueue struct is allocated in autofswait(), its initial waitctr equals 2. After that waiteventkillable() is interrupted (it returns -ERESTARTSYS), so that 'wq->name.name == NULL' condition may be not satisfied. Actually, this condition can be satisfied when autofswaitrelease() or autofscatatonicmode() is called and, what is also important, waitctr is decremented in those places. Upon the exit of autofswait(), waitctr is decremented to 1. Then the unmounting process begins: killsb calls autofscatatonic_mode(), which should have freed the waitqueues, but it only decrements its usage counter to zero which is not a correct behaviour.

edit:imk This description is of course not correct. The umount performed as a result of an expire is a umount of a mount that has been automounted, it's not the autofs mount itself. They happen independently, usually after everything mounted within the autofs file system has been expired away. If everything hasn't been expired away the automount daemon can still exit leaving mounts in place. But expires done in both cases will result in a notification that calls autofswaitrelease() with a result status. The problem case is the summary execution of of the automount daemon. In this case any waiting processes won't be woken up until either they are terminated or the mount is umounted. end edit: imk

So in catatonic mode we should free waitqueues which counter becomes zero.

edit: imk Initially I was concerned that the calling of autofswaitrelease() and autofscatatonicmode() was not mutually exclusive but that can't be the case (obviously) because the queue entry (or entries) is removed from the list when either of these two functions are called. Consequently the wait entry will be freed by only one of these functions or by the woken process in autofs_wait() depending on the order of the calls. end edit: imk

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54134.json",
    "cna_assigner": "Linux"
}
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
296f7bf78bc5c7a4d772aea580ce800d14040d1a
Fixed
1985e8eae8627f02e3364690c5fed7af1c46be55
Fixed
976abbdc120a97049b9133e60fa7b29627d11de4
Fixed
6079dc77c6f32936e8a6766ee8334ae3c99f4504
Fixed
69ddafc7a7afd8401bab53eff5af813fa0d368a2
Fixed
71eeddcad7342292c19042c290c477697acaccab
Fixed
726deae613bc1b6096ad3b61cc1e63e33330fbc2
Fixed
696b625f3f85d80fca48c24d2948fbc451e74366
Fixed
ccbe77f7e45dfb4420f7f531b650c00c6e9c7507

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-54134.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
2.6.27
Fixed
4.14.326
Type
ECOSYSTEM
Events
Introduced
4.15.0
Fixed
4.19.295
Type
ECOSYSTEM
Events
Introduced
4.20.0
Fixed
5.4.257
Type
ECOSYSTEM
Events
Introduced
5.5.0
Fixed
5.10.197
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.133
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.55
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.5.5

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-54134.json"