Linux
firmware: arm_ffa: Fix out-of-bound writes in ffa_setup_and_transmit()
In the Linux kernel, the following vulnerability has been resolved: firmware: arm_ffa: Fix out-of-bound writes in ffa_setup_and_transmit() Sashiko (locally) reports multiple out-of-bound issues in ffa_setup_and_transmit: 1) Writing ep_mem_access->reserved can write out of bounds for FFA versions < 1.2 as ffa_emad_size_get() returns 16 bytes in that case while reserved has an offset of 24. Instead of zeroing fields, memset the struct to zero first based on the FFA version. 2) Make sure there is enough size to write constituents. While at it, convert the only sizeof() in the driver that uses a type instead of variable.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 22157f74458106c5900dbd938eb44623c22d97a0, < 500f92f398c717aa515afd23c7a38c0e7f4a1dc9
- >= 111a833dc5cbef3d05b2a796a7e23cb7f6ff2192, < d312a71b19bb83803c8d1372bc042bd36db657f7
- >= 111a833dc5cbef3d05b2a796a7e23cb7f6ff2192, < 00bef9d0f9e787f56ff4699d3b577983ff8b7f24
- >= 111a833dc5cbef3d05b2a796a7e23cb7f6ff2192, < cf5708c9d78c98214c62b1e5d049cd527a543b8e
- >= 111a833dc5cbef3d05b2a796a7e23cb7f6ff2192, < 27abdaf0c5c89b06694e4c3d8318e8d6a60c1d1b
- >= 111a833dc5cbef3d05b2a796a7e23cb7f6ff2192, < 3383ffb7ef937317361713ffcc21921a7848511a
- 28ebfb74fbf513e0c7cd2674d8c2400ee0220d18
- b77ec23b6df41c48e88735230e11caec56163630
- >= 6.1.31, < 6.1.191
- >= 5.15.114, < 5.16
- >= 6.3.5, < 6.4
Fixed in 500f92f398c717aa515afd23c7a38c0e7f4a1dc9, d312a71b19bb83803c8d1372bc042bd36db657f7, 00bef9d0f9e787f56ff4699d3b577983ff8b7f24, cf5708c9d78c98214c62b1e5d049cd527a543b8e, 27abdaf0c5c89b06694e4c3d8318e8d6a60c1d1b, 3383ffb7ef937317361713ffcc21921a7848511a, 6.1.191, 5.16, 6.4
- 6.4
Fixed in 0, 6.1.191, 6.6.160, 6.12.114, 6.18.42, 7.1.6, 7.2
Mitigation
Upgrade Linux to 500f92f398c717aa515afd23c7a38c0e7f4a1dc9 or d312a71b19bb83803c8d1372bc042bd36db657f7 or 00bef9d0f9e787f56ff4699d3b577983ff8b7f24 or cf5708c9d78c98214c62b1e5d049cd527a543b8e or 27abdaf0c5c89b06694e4c3d8318e8d6a60c1d1b or 3383ffb7ef937317361713ffcc21921a7848511a or 6.1.191 or 5.16 or 6.4 or later.
Upgrade Linux to 0 or 6.1.191 or 6.6.160 or 6.12.114 or 6.18.42 or 7.1.6 or 7.2 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.