Commit 4a1cc9e
Sudeep Holla
firmware: arm_ffa: Validate framework notification message layout
Framework notifications carry an indirect message in the shared RX
buffer. Validate the reported offset and size before using them, reject
zero-length payloads, and ensure that any non-header payload starts at
the UUID field rather than in the middle of the message header.
Use the validated offset and size values for both kmemdup() and the UUID
parsing path so malformed firmware data cannot drive an out-of-bounds
read or an oversized allocation.
Fixes: 285a5ea ("firmware: arm_ffa: Add support for handling framework notifications")
Link: https://patch.msgid.link/20260428-ffa_fixes-v2-8-8595ae450034@kernel.org
Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>1 parent 2af18f8 commit 4a1cc9e
1 file changed
Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1487 | 1487 | | |
1488 | 1488 | | |
1489 | 1489 | | |
| 1490 | + | |
1490 | 1491 | | |
1491 | 1492 | | |
1492 | 1493 | | |
1493 | 1494 | | |
1494 | 1495 | | |
1495 | 1496 | | |
| 1497 | + | |
| 1498 | + | |
1496 | 1499 | | |
1497 | | - | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
1498 | 1512 | | |
1499 | 1513 | | |
1500 | 1514 | | |
1501 | 1515 | | |
1502 | 1516 | | |
1503 | 1517 | | |
1504 | | - | |
| 1518 | + | |
1505 | 1519 | | |
1506 | 1520 | | |
1507 | 1521 | | |
| |||
0 commit comments