Commit 5c470bbf authored by Fruhwirth Clemens's avatar Fruhwirth Clemens Committed by Linus Torvalds

[PATCH] Fix cryptoloop disk corruption under CBC mode

It was caused by improper IV calculation in loop.c
parent 808ebd4e
...@@ -513,6 +513,7 @@ static int loop_transfer_bio(struct loop_device *lo, ...@@ -513,6 +513,7 @@ static int loop_transfer_bio(struct loop_device *lo,
from_bvec->bv_len, IV); from_bvec->bv_len, IV);
kunmap(from_bvec->bv_page); kunmap(from_bvec->bv_page);
kunmap(to_bvec->bv_page); kunmap(to_bvec->bv_page);
IV += from_bvec->bv_len >> 9;
} }
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment