Commit 146eb58
io_uring: fix regbuf vector size truncation
There is a report of io_estimate_bvec_size() truncating the calculated
number of segments that leads to corruption issues. Check it doesn't
overflow "int"s used later. Rough but simple, can be improved on top.
Cc: [email protected]
Fixes: 9ef4cbb ("io_uring: add infra for importing vectored reg buffers")
Reported-by: Google Big Sleep <[email protected]>
Signed-off-by: Pavel Begunkov <[email protected]>
Reviewed-by: Günther Noack <[email protected]>
Tested-by: Günther Noack <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>1 parent 1fd5367 commit 146eb58
1 file changed
+9
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1403 | 1403 | | |
1404 | 1404 | | |
1405 | 1405 | | |
1406 | | - | |
| 1406 | + | |
1407 | 1407 | | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
1408 | 1411 | | |
1409 | 1412 | | |
1410 | 1413 | | |
| |||
1510 | 1513 | | |
1511 | 1514 | | |
1512 | 1515 | | |
1513 | | - | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
1514 | 1521 | | |
1515 | 1522 | | |
1516 | 1523 | | |
| |||
0 commit comments