OSD: Reject inverted ranges in primary LIST #176

Merged
vitalif merged 2 commits from koolkhel/vitastor:osd-primary-list-inverted-range into master 2026-11-25 20:52:19 +03:00

2 Commits

Author SHA1 Message Date
4442a79060 OSD: Also test a primary LIST without an upper bound
max_stripe = 0 means no upper bound, so the inverted range check must
not reject a listing that only sets min_stripe.
2026-11-24 20:02:22 +03:00
2bb8967350 OSD: Reject inverted ranges in primary LIST
A primary LIST (OSD_OP_SEC_LIST with OSD_LIST_PRIMARY) with min_stripe
above max_stripe made add_primary_list() start from lower_bound(min),
which lies after upper_bound(max). If an unclean object of the PG was
between the two bounds, the loop never met its end iterator and walked
past the end of the btree, reading out of bounds and filling the result
set with garbage until the OSD ran out of memory.

Reject such a request with -EINVAL, like the other malformed ones.
2026-11-24 14:28:33 +03:00