{"id":"CVE-2021-47365","aliases":["CVE-2021-47365"],"related":[],"kind":"vulnerability","state":"published","title":"afs: Fix page leak","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nafs: Fix page leak\n\nThere's a loop in afs_extend_writeback() that adds extra pages to a write\nwe want to make to improve the efficiency of the writeback by making it\nlarger.  This loop stops, however, if we hit a page we can't write back\nfrom immediately, but it doesn't get rid of the page ref we speculatively\nacquired.\n\nThis was caused by the removal of the cleanup loop when the code switched\nfrom using find_get_pages_contig() to xarray scanning as the latter only\ngets a single page at a time, not a batch.\n\nFix this by putting the page on a ref on an early break from the loop.\nUnfortunately, we can't just add that page to the pagevec we're employing\nas we'll go through that and add those pages to the RPC call.\n\nThis was found by the generic/074 test.  It leaks ~4GiB of RAM each time it\nis run - which can be observed with \"top\".","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nafs: Fix page leak\n\nThere's a loop in afs_extend_writeback() that adds extra pages to a write\nwe want to make to improve the efficiency of the writeback by making it\nlarger.  This loop stops, however, if we hit a page we can't write back\nfrom immediately, but it doesn't get rid of the page ref we speculatively\nacquired.\n\nThis was caused by the removal of the cleanup loop when the code switched\nfrom using find_get_pages_contig() to xarray scanning as the latter only\ngets a single page at a time, not a batch.\n\nFix this by putting the page on a ref on an early break from the loop.\nUnfortunately, we can't just add that page to the pagevec we're employing\nas we'll go through that and add those pages to the RPC call.\n\nThis was found by the generic/074 test.  It leaks ~4GiB of RAM each time it\nis run - which can be observed with \"top\".","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se resolvió la siguiente vulnerabilidad: afs: Reparar pérdida de página. Hay un bucle en afs_extend_writeback() que agrega páginas adicionales a una escritura que queremos realizar para mejorar la eficiencia de la escritura diferida haciéndola más grande. Sin embargo, este bucle se detiene si llegamos a una página desde la que no podemos escribir de inmediato, pero no elimina la referencia de página que adquirimos especulativamente. Esto se debió a la eliminación del bucle de limpieza cuando el código pasó de usar find_get_pages_contig() a escanear xarray, ya que este último solo obtiene una página a la vez, no un lote. Solucione este problema poniendo la página en un árbitro en un descanso temprano del bucle. Desafortunadamente, no podemos simplemente agregar esa página al pagevec que estamos empleando, ya que revisaremos eso y agregaremos esas páginas a la llamada RPC. Esto se encontró mediante la prueba genérica/074. Pierde ~4GiB de RAM cada vez que se ejecuta, lo que se puede observar con \"TOP\".","source":"nvd"}],"published":"2024-05-21T15:03:32.520Z","modified":"2026-06-17T04:17:18.090Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-459"],"affected":[{"ranges":[{"type":"git","introduced":"e87b03f5830ecd8ca21836d3ee48c74f8d58fa31","fixed":"d130b5fdd42254d92948d06347940276140c927e","status":"affected"},{"type":"git","introduced":"e87b03f5830ecd8ca21836d3ee48c74f8d58fa31","fixed":"581b2027af0018944ba301d68e7af45c6d1128b5","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.13","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.13","status":"unaffected"},{"type":"semver","introduced":"5.14.9","lastAffected":"5.14.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.15","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.13","fixed":"5.14.9"},{"status":"affected","version":"5.14.9"},{"status":"affected","version":"5.15"},{"status":"affected","version":"5.15"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/d130b5fdd42254d92948d06347940276140c927e","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/581b2027af0018944ba301d68e7af45c6d1128b5","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-06-17T17:37:29.782Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-47365","url":"https://www.cve.org/CVERecord?id=CVE-2021-47365","licence":"CVE Terms of Use","modified":"2026-05-11T13:53:17.881Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-47365","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-47365","licence":"Public domain","modified":"2026-06-17T04:17:18.090Z"}],"updatedAt":"2026-11-25T22:58:08.818Z","epss":{"score":0.00208,"percentile":0.11565,"date":"2026-12-01T12:00:22.000Z"}}