lockd: Plug nlm_file leak when nlm_do_fopen() fails
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 7f024fcd5c97dc70bb9121c80407cf3cf9be7159 · < 1161c4b5bd0048c8148e919f818a33cff3623ef0| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
lockd: Plug nlm_file leak when nlm_do_fopen() fails
A client can repeatedly drive nlm_do_fopen() failures by presenting file handles that the underlying export rejects. After kzalloc_obj() succeeds in nlm_lookup_file(), the freshly allocated nlm_file is not yet inserted into nlm_files[]. The nlm_do_fopen() failure path jumps to out_unlock, which releases nlm_file_mutex and returns without freeing the allocation, so each failure leaks one nlm_file.
Route the failure through out_free so kfree() runs before the function returns.
From the CVE record · Linux
Linux kernel lockd leaks an nlm_file allocation when nlm_do_fopen() fails. A client can repeatedly trigger the leak by presenting file handles rejected by the underlying export. The input does not specify authentication requirements or user interaction.
Engineers running Linux kernels with lockd should check their kernel versions; affected versions are not specified.