CVE-2023-54049: rpmsg: glink: Add check for kstrdup
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
rpmsg: glink: Add check for kstrdup
Add check for the return value of kstrdup() and return the error if it fails in order to avoid NULL pointer dereference.
The Linux kernel CVE team has assigned CVE-2023-54049 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.13 with commit b4f8e52b89f69f5563ac4cb9ffdacc4418917af1 and fixed in 4.14.326 with commit 5197498c902502127a47abda5359dd7f1d41946f Issue introduced in 4.13 with commit b4f8e52b89f69f5563ac4cb9ffdacc4418917af1 and fixed in 4.19.295 with commit 13928a837e0f014dac0322dd9f8a67c486e7f232 Issue introduced in 4.13 with commit b4f8e52b89f69f5563ac4cb9ffdacc4418917af1 and fixed in 5.4.257 with commit efa7f31669f04084ed5996ed467ba529f4c90467 Issue introduced in 4.13 with commit b4f8e52b89f69f5563ac4cb9ffdacc4418917af1 and fixed in 5.10.195 with commit 71ac2ffd7f80fdd350486f6645dc48456e55a59b Issue introduced in 4.13 with commit b4f8e52b89f69f5563ac4cb9ffdacc4418917af1 and fixed in 5.15.132 with commit abd740db896b3c588dced175af98b95852c1854b Issue introduced in 4.13 with commit b4f8e52b89f69f5563ac4cb9ffdacc4418917af1 and fixed in 6.1.53 with commit cae0787e408c30a575760a531ccb69a6b48bbfaf Issue introduced in 4.13 with commit b4f8e52b89f69f5563ac4cb9ffdacc4418917af1 and fixed in 6.4.16 with commit 174cf8853857c190a3c4f1f1d2d06cfd095fe859 Issue introduced in 4.13 with commit b4f8e52b89f69f5563ac4cb9ffdacc4418917af1 and fixed in 6.5.3 with commit e3734a9558afac91df3c655a6f2376b9d14933b7 Issue introduced in 4.13 with commit b4f8e52b89f69f5563ac4cb9ffdacc4418917af1 and fixed in 6.6 with commit b5c9ee8296a3760760c7b5d2e305f91412adc795
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-2023-54049
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:
drivers/rpmsg/qcom_glink_native.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/5197498c902502127a47abda5359dd7f1d41946f https://git.kernel.org/stable/c/13928a837e0f014dac0322dd9f8a67c486e7f232 https://git.kernel.org/stable/c/efa7f31669f04084ed5996ed467ba529f4c90467 https://git.kernel.org/stable/c/71ac2ffd7f80fdd350486f6645dc48456e55a59b https://git.kernel.org/stable/c/abd740db896b3c588dced175af98b95852c1854b https://git.kernel.org/stable/c/cae0787e408c30a575760a531ccb69a6b48bbfaf https://git.kernel.org/stable/c/174cf8853857c190a3c4f1f1d2d06cfd095fe859 https://git.kernel.org/stable/c/e3734a9558afac91df3c655a6f2376b9d14933b7 https://git.kernel.org/stable/c/b5c9ee8296a3760760c7b5d2e305f91412adc795