Tag: 9dcbeed4d7e11e1dcf5e55475de3754f0855d1c2

btrfs: fix signed overflows in btrfs_sync_file

Author: David Sterba <dsterba@suse.com> The calculation of range length in btrfs_sync_file leads to signed overflow. This was caught by PaX gcc SIZE_OVERFLOW plugin. https://forums.grsecurity.net/viewtopic.php?f=1&t=4284 The fsync call passes 0 and LLONG_MAX, the range length does not fit to loff_t and overflows, but the value is converted to u64 so it silently works as expected. The …

Continue reading