[Devel] [PATCH hci-8.2 v2 1/2] dm/push_backup: reject a cluster size of 0

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Tue Dec 1 03:14:09 MSK 2026


> pb_ctr() parses the cluster size with kstrtou32(), which accepts 0, and
> then computes the number of clusters with DIV_ROUND_UP(ti->len, sectors).
> So a table line with a cluster size of 0 divides by zero and oopses
> inside the constructor. Even if the constructor survived, pb->clu_size
> would be 0 and calc_bio_clusters() would divide by it on every write.
> 
> Only root can load a table, but a malformed table line must not oops
> the kernel. Reject a cluster size of 0 with EINVAL.
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-155791
> 
> Feature: dm-backup: push backup target driver
> Fixes: 162123bc62c7 ("dm: Add push backup driver")
> Signed-off-by: Vasileios Almpanis <vasileios.almpanis at virtuozzo.com>

Sashiko has reviewed this patch and found no issues.

Carry the trailer below into the next revision and Sashiko will not review this patch again.

Reviewed-by: Sashiko <no-reply at sashiko.virtuozzo.com>

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261125-push-backup-fixes-v2-0-195a2bcd82f7@virtuozzo.com?part=1




More information about the Devel mailing list