{"id":"CVE-2022-50107","state":"PUBLISHED","title":"cifs: Fix memory leak when using fscache","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ncifs: Fix memory leak when using fscache\n\nIf we hit the 'index == next_cached' case, we leak a refcount on the\nstruct page.  Fix this by using readahead_folio() which takes care of\nthe refcount for you.","publishedAt":"2025-06-18T11:02:41.395Z","updatedAt":"2026-05-11T19:12:58.297Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"0174ee9947bd0f24fee2794b35258960d108b7aa","status":"affected","lessThan":"7105b4047481bc2950fb767cff328d8b75292c0f","versionType":"git"},{"version":"0174ee9947bd0f24fee2794b35258960d108b7aa","status":"affected","lessThan":"ae497726cd090673a4d20ac725ccc2de8067a7a5","versionType":"git"},{"version":"0174ee9947bd0f24fee2794b35258960d108b7aa","status":"affected","lessThan":"c6f62f81b488d00afaa86bae26c6ce9ab12c709e","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/cifs/file.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.17","versionType":"semver"},{"version":"5.18.18","status":"unaffected","lessThanOrEqual":"5.18.*","versionType":"semver"},{"version":"5.19.2","status":"unaffected","lessThanOrEqual":"5.19.*","versionType":"semver"},{"version":"6.0","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/cifs/file.c"]}],"references":["https://git.kernel.org/stable/c/7105b4047481bc2950fb767cff328d8b75292c0f","https://git.kernel.org/stable/c/ae497726cd090673a4d20ac725ccc2de8067a7a5","https://git.kernel.org/stable/c/c6f62f81b488d00afaa86bae26c6ce9ab12c709e"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/50xxx/CVE-2022-50107.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-50107","state":"PUBLISHED","datePublished":"2025-06-18T11:02:41.395Z","dateUpdated":"2026-05-11T19:12:58.297Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-06-18T10:57:27.413Z"},"containers":{"cna":{"title":"cifs: Fix memory leak when using fscache","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ncifs: Fix memory leak when using fscache\n\nIf we hit the 'index == next_cached' case, we leak a refcount on the\nstruct page.  Fix this by using readahead_folio() which takes care of\nthe refcount for you."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"0174ee9947bd0f24fee2794b35258960d108b7aa","status":"affected","lessThan":"7105b4047481bc2950fb767cff328d8b75292c0f","versionType":"git"},{"version":"0174ee9947bd0f24fee2794b35258960d108b7aa","status":"affected","lessThan":"ae497726cd090673a4d20ac725ccc2de8067a7a5","versionType":"git"},{"version":"0174ee9947bd0f24fee2794b35258960d108b7aa","status":"affected","lessThan":"c6f62f81b488d00afaa86bae26c6ce9ab12c709e","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/cifs/file.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.17","versionType":"semver"},{"version":"5.18.18","status":"unaffected","lessThanOrEqual":"5.18.*","versionType":"semver"},{"version":"5.19.2","status":"unaffected","lessThanOrEqual":"5.19.*","versionType":"semver"},{"version":"6.0","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/cifs/file.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/7105b4047481bc2950fb767cff328d8b75292c0f"},{"url":"https://git.kernel.org/stable/c/ae497726cd090673a4d20ac725ccc2de8067a7a5"},{"url":"https://git.kernel.org/stable/c/c6f62f81b488d00afaa86bae26c6ce9ab12c709e"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T19:12:58.297Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.17","versionEndExcluding":"5.18.18"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.17","versionEndExcluding":"5.19.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.17","versionEndExcluding":"6.0"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}