Skip to content

xfs: fix potential integer overflow in sort comparators

Yuto Ohnuki linux-xfs lkml 1 version Applied

Status from this message: Applied to for-next, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2xfs: fix integer overflow in deferred intent sort comparatorsfs/xfs/xfs_extfree_item.c fs/xfs/xfs_refcount_item.c fs/xfs/xfs_rmap_item.c+3 -31 reply
2/2xfs: fix integer overflow in busy extent sort comparatorfs/xfs/xfs_extent_busy.c+2 -21 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchChristoph HellwigCarlos Maiolino
SeriesR-b
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

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

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(-)
Signature · 8 lines
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