CVE-2023-54134

autofs: fix memory leak of waitqueues in autofs_catatonic_mode

No CVSS score yet EPSS 0.25%

Published 24 Dec 2025 Updated 11 May 2026 CNA: Linux

Check your servers for CVE-2023-54134

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2023-54134 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

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

autofs: fix memory leak of waitqueues in autofs_catatonic_mode

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>] kmalloc_trace+0x20/0x90 mm/slab_common.c:1046 [<ffffffff81bb75ca>] kmalloc include/linux/slab.h:576 [inline] [<ffffffff81bb75ca>] autofs_wait+0x3fa/0x9a0 fs/autofs/waitq.c:378 [<ffffffff81bb88a7>] autofs_do_expire_multi+0xa7/0x3e0 fs/autofs/expire.c:593 [<ffffffff81bb8c33>] autofs_expire_multi+0x53/0x80 fs/autofs/expire.c:619 [<ffffffff81bb6972>] autofs_root_ioctl_unlocked+0x322/0x3b0 fs/autofs/root.c:897 [<ffffffff81bb6a95>] autofs_root_ioctl+0x25/0x30 fs/autofs/root.c:910 [<ffffffff81602a9c>] vfs_ioctl fs/ioctl.c:51 [inline] [<ffffffff81602a9c>] __do_sys_ioctl fs/ioctl.c:870 [inline] [<ffffffff81602a9c>] __se_sys_ioctl fs/ioctl.c:856 [inline] [<ffffffff81602a9c>] __x64_sys_ioctl+0xfc/0x140 fs/ioctl.c:856 [<ffffffff84608225>] do_syscall_x64 arch/x86/entry/common.c:50 [inline] [<ffffffff84608225>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 [<ffffffff84800087>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

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

In this case an AUTOFS_IOC_EXPIRE_MULTI ioctl is done, then a new waitqueue struct is allocated in autofs_wait(), its initial wait_ctr equals 2. After that wait_event_killable() is interrupted (it returns -ERESTARTSYS), so that 'wq->name.name == NULL' condition may be not satisfied. Actually, this condition can be satisfied when autofs_wait_release() or autofs_catatonic_mode() is called and, what is also important, wait_ctr is decremented in those places. Upon the exit of autofs_wait(), wait_ctr is decremented to 1. Then the unmounting process begins: kill_sb calls autofs_catatonic_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 autofs_wait_release() 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 autofs_wait_release() and autofs_catatonic_mode() 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

Exploitation

EPSS 0.25%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 17.9% of all scored CVEs. Scores of 1 Dec 2026.

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 296f7bf78bc5c7a4d772aea580ce800d14040d1a, before 1985e8eae8627f02e3364690c5fed7af1c46be55
affected from 296f7bf78bc5c7a4d772aea580ce800d14040d1a, before 976abbdc120a97049b9133e60fa7b29627d11de4
affected from 296f7bf78bc5c7a4d772aea580ce800d14040d1a, before 6079dc77c6f32936e8a6766ee8334ae3c99f4504
affected from 296f7bf78bc5c7a4d772aea580ce800d14040d1a, before 69ddafc7a7afd8401bab53eff5af813fa0d368a2
affected from 296f7bf78bc5c7a4d772aea580ce800d14040d1a, before 71eeddcad7342292c19042c290c477697acaccab
affected from 296f7bf78bc5c7a4d772aea580ce800d14040d1a, before 726deae613bc1b6096ad3b61cc1e63e33330fbc2
affected from 296f7bf78bc5c7a4d772aea580ce800d14040d1a, before 696b625f3f85d80fca48c24d2948fbc451e74366
affected from 296f7bf78bc5c7a4d772aea580ce800d14040d1a, before ccbe77f7e45dfb4420f7f531b650c00c6e9c7507
Other versions: unaffected
Linux
affected 2.6.27
unaffected before 2.6.27
unaffected from 4.14.326 up to and including 4.14.*
unaffected from 4.19.295 up to and including 4.19.*
unaffected from 5.4.257 up to and including 5.4.*
unaffected from 5.10.197 up to and including 5.10.*
unaffected from 5.15.133 up to and including 5.15.*
unaffected from 6.1.55 up to and including 6.1.*
unaffected from 6.5.5 up to and including 6.5.*
unaffected 6.6 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2023-54134 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2023-54134

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2023-54134
trivy image --scanners vuln IMAGE | grep CVE-2023-54134

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2023-54134 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.