Re: [PATCH] drbd: reject an out-of-range offset when decoding a compressed bitmap

From: Yehyeong Lee

Date: Fri Nov 20 2026 - 10:05:15 EST


On Tue, Oct 06, 2026 at 12:57:13PM +0900, Yehyeong Lee wrote:
> recv_bm_rle_bits() decodes a run-length-encoded bitmap from the peer and
> accumulates the bit position s across the runs. The upper bound
> (e >= c->bm_bits) is only checked in the branch taken for a set-bits
> (toggle) run, so a clear run advances s with no check at all. A peer can
> make s run past the bitmap with a single run; it is stored in
> c->bit_offset unvalidated, recv_bm_rle_bits() returns "not done"

This is superseded by v2:
https://lore.kernel.org/all/20261006141509.521128-1-yhlee@xxxxxxxxxxxxxxxxxx/

Best regards,
Yehyeong Lee