[PATCH 0/2] xfs: fix potential integer overflow in sort comparators

Yuto Ohnuki posted 2 patches 4 days, 17 hours ago
fs/xfs/xfs_extent_busy.c   | 4 ++--
fs/xfs/xfs_extfree_item.c  | 2 +-
fs/xfs/xfs_refcount_item.c | 2 +-
fs/xfs/xfs_rmap_item.c     | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
[PATCH 0/2] xfs: fix potential integer overflow in sort comparators
Posted by Yuto Ohnuki 4 days, 17 hours ago
Several sort comparators in XFS subtract two uint32_t values and
return the result as int, which can overflow when the difference
exceeds INT_MAX.

Use cmp_int() instead, as was done in commit 362c49098086
("xfs: fix integer overflow in bmap intent sort comparator").

Patch 1 fixes the deferred intent comparators (rmap, extfree, refcount).
Patch 2 fixes the busy extent comparator.

Yuto Ohnuki (2):
  xfs: fix integer overflow in deferred intent sort comparators
  xfs: fix integer overflow in busy extent sort comparator

 fs/xfs/xfs_extent_busy.c   | 4 ++--
 fs/xfs/xfs_extfree_item.c  | 2 +-
 fs/xfs/xfs_refcount_item.c | 2 +-
 fs/xfs/xfs_rmap_item.c     | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

-- 
2.50.1




Amazon Web Services EMEA SARL, 38 avenue John F. Kennedy, L-1855 Luxembourg, R.C.S. Luxembourg B186284

Amazon Web Services EMEA SARL, Irish Branch, One Burlington Plaza, Burlington Road, Dublin 4, Ireland, branch registration number 908705