Commit 03dec28
copy_file_range: limit size if in compat mode
[ Upstream commit f8f59a2c05dc16d19432e3154a9ac7bc385f4b92 ]
If the process runs in 32-bit compat mode, copy_file_range results can be
in the in-band error range. In this case limit copy length to MAX_RW_COUNT
to prevent a signed overflow.
Reported-by: Florian Weimer <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]/
Signed-off-by: Miklos Szeredi <[email protected]>
Link: https://lore.kernel.org/[email protected]
Reviewed-by: Amir Goldstein <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>1 parent 9d0ac18 commit 03dec28
1 file changed
Lines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1576 | 1576 | | |
1577 | 1577 | | |
1578 | 1578 | | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
1579 | 1586 | | |
1580 | 1587 | | |
1581 | 1588 | | |
| |||
1589 | 1596 | | |
1590 | 1597 | | |
1591 | 1598 | | |
1592 | | - | |
1593 | | - | |
1594 | | - | |
| 1599 | + | |
1595 | 1600 | | |
1596 | 1601 | | |
1597 | 1602 | | |
| |||
1624 | 1629 | | |
1625 | 1630 | | |
1626 | 1631 | | |
1627 | | - | |
1628 | | - | |
| 1632 | + | |
1629 | 1633 | | |
1630 | 1634 | | |
1631 | 1635 | | |
| |||
0 commit comments