autofs: fix sbi->pipe file reference leak in autofs_kill_sb()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ ebc921ca9b92a3cf304d99bd7b7f373ec78c7ed7 · < 4bcb371019097d0e357f097902587401c509bbc9| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
autofs: fix sbi->pipe file reference leak in autofs_kill_sb()
When autofs_fill_super() fails before clearing AUTOFS_SBI_CATATONIC (for example, when find_get_pid() fails on an invalid pgrp mount option, or when an fs_context is closed before mounting), deactivate_locked_super() invokes autofs_kill_sb() -> autofs_catatonic_mode(sbi).
Because AUTOFS_SBI_CATATONIC is still set in sbi->flags, autofs_catatonic_mode() returns early without calling fput(sbi->pipe), permanently leaking the pipe struct file reference.
Explicitly release sbi->pipe in autofs_kill_sb() if it is still non-NULL after autofs_catatonic_mode().
From the CVE record · Linux
The Linux kernel’s autofs code can permanently leak a pipe file reference when autofs setup fails before clearing its catatonic flag. This can occur during a failed mount with an invalid pgrp option or when a filesystem context is closed before mounting; the input does not specify whether an attacker needs privileges to trigger it.
Engineers running Linux kernels with autofs should check whether their kernel includes the fix; affected versions are not specified.