Linux: nfc: pn533: fix OOB read in pn533_acr122_is_rx_frame_valid()
What fixes it
- 8db3b1e012a8b25078dfa1efabe3d0cd2916dcbaLinuxCVE List
- 74b3fbc60907ee97e3af3249091f57351b53a6d6LinuxCVE List
- 8a0f1bb790d964893db7fc59febda9a534db07b3LinuxCVE List
- 72b8b2126e854d6756a1aa4bdc66d7457b832294LinuxCVE List
- 2450a388367231fb7dd798538f393af227c00c4dLinuxCVE List
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
In the Linux kernel, the following vulnerability has been resolved:
nfc: pn533: fix OOB read in pn533_acr122_is_rx_frame_valid()
frame->ccid.datalen is read directly from the USB response frame and used, unchecked, as an index into frame->data[]. A malicious or malfunctioning device can set this field to an arbitrary value, causing the driver to read far outside the received buffer.
Bound ccid.datalen against the maximum possible ACR122 frame size before using it. This replaces the existing datalen == 0 check, since datalen < 2 already covers that case and additionally rejects datalen == 1, which would still underflow the "datalen - 2" offset used below.
Text from CVE List
Affected versions 18
- Linuxaffected: 9815c7cf22daceabfb919ddcd6f2c80e049c1fbc before 8db3b1e012a8b25078dfa1efabe3d0cd2916dcbaCVE List
- Linuxaffected: 9815c7cf22daceabfb919ddcd6f2c80e049c1fbc before 74b3fbc60907ee97e3af3249091f57351b53a6d6CVE List
- Linuxaffected: 9815c7cf22daceabfb919ddcd6f2c80e049c1fbc before 8a0f1bb790d964893db7fc59febda9a534db07b3CVE List
- Linuxaffected: 9815c7cf22daceabfb919ddcd6f2c80e049c1fbc before ea82b7576793219fa10a8b545f8338998b2a9ce2CVE List
- Linuxaffected: 9815c7cf22daceabfb919ddcd6f2c80e049c1fbc before 72b8b2126e854d6756a1aa4bdc66d7457b832294CVE List
- Linuxaffected: 9815c7cf22daceabfb919ddcd6f2c80e049c1fbc before e72cbedc4596e808d22dd2b9fff666ece76f8dd6CVE List
- Linuxaffected: 9815c7cf22daceabfb919ddcd6f2c80e049c1fbc before 2450a388367231fb7dd798538f393af227c00c4dCVE List
- Linuxaffected: 9815c7cf22daceabfb919ddcd6f2c80e049c1fbc before b61732f47316d45f27706db7812950145d3327b5CVE List
- Linuxaffected: 4.7CVE List
- Linuxunaffected: all versions before 4.7CVE List
- Linuxunaffected: 5.10.271 through 5.10.*CVE List
- Linuxunaffected: 5.15.222 through 5.15.*CVE List
- Linuxunaffected: 6.1.189 through 6.1.*CVE List
- Linuxunaffected: 6.6.158 through 6.6.*CVE List
- Linuxunaffected: 6.12.112 through 6.12.*CVE List
- Linuxunaffected: 6.18.55 through 6.18.*CVE List
- Linuxunaffected: 7.2.9 through 7.2.*CVE List
- Linuxunaffected: 7.3CVE List
References 8
- git.kernel.org/stable/c/8db3b1e012a8b25078dfa1efabe3d0cd2916dcbaReferencevia CVE List
- git.kernel.org/stable/c/74b3fbc60907ee97e3af3249091f57351b53a6d6Referencevia CVE List
- git.kernel.org/stable/c/8a0f1bb790d964893db7fc59febda9a534db07b3Referencevia CVE List
- git.kernel.org/stable/c/ea82b7576793219fa10a8b545f8338998b2a9ce2Referencevia CVE List
- git.kernel.org/stable/c/72b8b2126e854d6756a1aa4bdc66d7457b832294Referencevia CVE List
- git.kernel.org/stable/c/e72cbedc4596e808d22dd2b9fff666ece76f8dd6Referencevia CVE List
- git.kernel.org/stable/c/2450a388367231fb7dd798538f393af227c00c4dReferencevia CVE List
- git.kernel.org/stable/c/b61732f47316d45f27706db7812950145d3327b5Referencevia CVE List