firmware: arm_ffa: Fix out-of-bound writes in ffa_setup_and_transmit()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 111a833dc5cbef3d05b2a796a7e23cb7f6ff2192 · < 3383ffb7ef937317361713ffcc21921a7848511a| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel’s arm_ffa firmware driver can write out of bounds in ffa_setup_and_transmit() when handling FF-A versions earlier than 1.2 or when there is insufficient space for constituents. The input does not specify how an attacker could trigger this, or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels with the arm_ffa firmware driver should check their vendor’s advisory; affected kernel versions are not specified.