commit | 9a0ec045110dbaad4b8d609142b534f913354101 | [log] [tgz] |
---|---|---|
author | Reed Riley <reed@riley.engineer> | Sat May 04 22:12:23 2024 +0000 |
committer | Kent Overstreet <kent.overstreet@linux.dev> | Mon May 06 10:58:17 2024 -0400 |
tree | d0731fffb8d616c2764a0a394114dc1944ecff49 | |
parent | db42549d402cb44fe67c95d08f1a9ea902d32e7e [diff] |
bcachefs: fix overflow in fiemap filefrag (and potentially other utilities that call fiemap) sometimes pass ULONG_MAX as the length. fiemap_prep clamps excessively large lengths - but the calculation of end can overflow if it occurs before calling fiemap_prep. When this happens, filefrag assumes it has read to the end and exits. Signed-off-by: Reed Riley <reed@riley.engineer> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>