Commit 6516147
fuse: validate outarg offset and size in notify store/retrieve
Add validation checking for outarg offset and outarg size values passed
in by the server. MAX_LFS_FILESIZE is the maximum file size supported.
The fuse_notify_store_out and fuse_notify_retrieve_out structs take in
a uint64_t offset.
Add logic to ensure:
* outarg.offset is less than MAX_LFS_FILESIZE
* outarg.offset + outarg.size cannot exceed MAX_LFS_FILESIZE
* potential uint64_t overflow is fixed when adding outarg.offset and
outarg.size.
Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>1 parent 59ba47b commit 6516147
1 file changed
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1783 | 1783 | | |
1784 | 1784 | | |
1785 | 1785 | | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
1786 | 1789 | | |
| 1790 | + | |
1787 | 1791 | | |
1788 | 1792 | | |
1789 | 1793 | | |
| |||
1796 | 1800 | | |
1797 | 1801 | | |
1798 | 1802 | | |
1799 | | - | |
| 1803 | + | |
1800 | 1804 | | |
1801 | 1805 | | |
1802 | | - | |
| 1806 | + | |
1803 | 1807 | | |
1804 | 1808 | | |
1805 | | - | |
1806 | 1809 | | |
1807 | 1810 | | |
1808 | 1811 | | |
| |||
1882 | 1885 | | |
1883 | 1886 | | |
1884 | 1887 | | |
1885 | | - | |
| 1888 | + | |
1886 | 1889 | | |
1887 | 1890 | | |
1888 | 1891 | | |
| |||
1964 | 1967 | | |
1965 | 1968 | | |
1966 | 1969 | | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
1967 | 1973 | | |
1968 | 1974 | | |
1969 | 1975 | | |
| |||
0 commit comments