CVE-2021-47442: NFC: digital: fix possible memory leak in digital_in_send_sdd_req()
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
NFC: digital: fix possible memory leak in digital_in_send_sdd_req()
'skb' is allocated in digital_in_send_sdd_req(), but not free when digital_in_send_cmd() failed, which will cause memory leak. Fix it by freeing 'skb' if digital_in_send_cmd() return failed.
The Linux kernel CVE team has assigned CVE-2021-47442 to this issue.
Affected and fixed versions
===========================
Issue introduced in 3.13 with commit 2c66daecc409 and fixed in 4.4.290 with commit 74569c78aa84 Issue introduced in 3.13 with commit 2c66daecc409 and fixed in 4.9.288 with commit 88c890b0b9a1 Issue introduced in 3.13 with commit 2c66daecc409 and fixed in 4.14.252 with commit fcce6e525547 Issue introduced in 3.13 with commit 2c66daecc409 and fixed in 4.19.213 with commit 071bdef36391 Issue introduced in 3.13 with commit 2c66daecc409 and fixed in 5.4.155 with commit 2bde4aca56db Issue introduced in 3.13 with commit 2c66daecc409 and fixed in 5.10.75 with commit 50cb95487c26 Issue introduced in 3.13 with commit 2c66daecc409 and fixed in 5.14.14 with commit 6432d7f1d1c3 Issue introduced in 3.13 with commit 2c66daecc409 and fixed in 5.15 with commit 291c932fc369
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-2021-47442
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/nfc/digital_technology.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/74569c78aa84f8c958f1334b465bc530906ec99a https://git.kernel.org/stable/c/88c890b0b9a1fb9fcd01c61ada515e8b636c34f9 https://git.kernel.org/stable/c/fcce6e5255474ca33c27dda0cdf9bf5087278873 https://git.kernel.org/stable/c/071bdef36391958c89af5fa2172f691b31baa212 https://git.kernel.org/stable/c/2bde4aca56db9fe25405d39ddb062531493a65db https://git.kernel.org/stable/c/50cb95487c265187289810addec5093d4fed8329 https://git.kernel.org/stable/c/6432d7f1d1c3aa74cfe8f5e3afdf81b786c32e86 https://git.kernel.org/stable/c/291c932fc3692e4d211a445ba8aa35663831bac7