CVE-2024-36288: SUNRPC: Fix loop termination condition in gss_free_in_token_pages()
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
SUNRPC: Fix loop termination condition in gss_free_in_token_pages()
The in_token->pages[] array is not NULL terminated. This results in the following KASAN splat:
KASAN: maybe wild-memory-access in range [0x04a2013400000008-0x04a201340000000f]
The Linux kernel CVE team has assigned CVE-2024-36288 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.9.3 with commit 8ca148915670 and fixed in 6.9.4 with commit 0a1cb0c6102b Issue introduced in 6.10-rc1 with commit bafa6b4d95d9 and fixed in 6.10-rc3 with commit 4a77c3dead97 Issue introduced in 6.8.12 with commit a3c1afd5d7ad
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2024-36288
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
net/sunrpc/auth_gss/svcauth_gss.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/57ff6c0a175930856213b2aa39f8c845a53e5b1c https://git.kernel.org/stable/c/6ed45d20d30005bed94c8c527ce51d5ad8121018 https://git.kernel.org/stable/c/4cefcd0af7458bdeff56a9d8dfc6868ce23d128a https://git.kernel.org/stable/c/b4878ea99f2b40ef1925720b1b4ca7f4af1ba785 https://git.kernel.org/stable/c/f9977e4e0cd98a5f06f2492b4f3547db58deabf5 https://git.kernel.org/stable/c/af628d43a822b78ad8d4a58d8259f8bf8bc71115 https://git.kernel.org/stable/c/0a1cb0c6102bb4fd310243588d39461da49497ad https://git.kernel.org/stable/c/4a77c3dead97339478c7422eb07bf4bf63577008