[Devel] [PATCH RHEL9 COMMIT] dm: ploop: arithemtic overflow in ploop
Konstantin Khorenko
khorenko at virtuozzo.com
Mon May 13 13:19:31 MSK 2024
The commit is pushed to "branch-rh9-5.14.0-362.18.1.vz9.40.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh9-5.14.0-362.18.1.vz9.40.7
------>
commit a324ec3dc6bb2f1b96ccf73748a53d77903d4130
Author: Alexey Kuznetsov <kuznet at virtuozzo.com>
Date: Fri May 10 20:54:28 2024 +0800
dm: ploop: arithemtic overflow in ploop
Images of size > 2TB are corrupted!
https://pmc.acronis.work/browse/TTASK-68430
Signed-off-by: Alexey Kuznetsov <kuznet at acronis.com>
Feature: dm-ploop: ploop target driver
---
drivers/md/dm-ploop.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/dm-ploop.h b/drivers/md/dm-ploop.h
index db36687c8169..e693d0ed7fe4 100644
--- a/drivers/md/dm-ploop.h
+++ b/drivers/md/dm-ploop.h
@@ -317,7 +317,7 @@ static inline void ploop_remap_to_cluster(struct ploop *ploop,
struct pio *pio, u32 clu)
{
pio->bi_iter.bi_sector &= ((1 << ploop->cluster_log) - 1);
- pio->bi_iter.bi_sector |= (clu << ploop->cluster_log);
+ pio->bi_iter.bi_sector |= ((u64)clu << ploop->cluster_log);
}
static inline bool ploop_whole_cluster(struct ploop *ploop, struct pio *pio)
More information about the Devel
mailing list