CVE-2021-47365

Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
21/05/2024
Last modified:
12/05/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> afs: Fix page leak<br /> <br /> There&amp;#39;s a loop in afs_extend_writeback() that adds extra pages to a write<br /> we want to make to improve the efficiency of the writeback by making it<br /> larger. This loop stops, however, if we hit a page we can&amp;#39;t write back<br /> from immediately, but it doesn&amp;#39;t get rid of the page ref we speculatively<br /> acquired.<br /> <br /> This was caused by the removal of the cleanup loop when the code switched<br /> from using find_get_pages_contig() to xarray scanning as the latter only<br /> gets a single page at a time, not a batch.<br /> <br /> Fix this by putting the page on a ref on an early break from the loop.<br /> Unfortunately, we can&amp;#39;t just add that page to the pagevec we&amp;#39;re employing<br /> as we&amp;#39;ll go through that and add those pages to the RPC call.<br /> <br /> This was found by the generic/074 test. It leaks ~4GiB of RAM each time it<br /> is run - which can be observed with "top".

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.13 (including) 5.14.9 (excluding)
cpe:2.3:o:linux:linux_kernel:5.14.9:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.15:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.15:rc2:*:*:*:*:*:*