Commit c981c32
vfio/platform: check the bounds of read/write syscalls
commit ce9ff21 upstream.
count and offset are passed from user space and not checked, only
offset is capped to 40 bits, which can be used to read/write out of
bounds of the device.
Fixes: 6e3f264 (“vfio/platform: read and write support for the device fd”)
Cc: [email protected]
Reported-by: Mostafa Saleh <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Reviewed-by: Mostafa Saleh <[email protected]>
Tested-by: Mostafa Saleh <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 7d6405c commit c981c32
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
391 | 396 | | |
392 | 397 | | |
393 | 398 | | |
| |||
467 | 472 | | |
468 | 473 | | |
469 | 474 | | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
470 | 480 | | |
471 | 481 | | |
472 | 482 | | |
| |||
0 commit comments