[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [qemu-xen master] block/crypto: disallow write sharing by default
commit 662d0c5392a272aa0357aa7205e77fa3ca89c316 Author: Maxim Levitsky <mlevitsk@xxxxxxxxxx> AuthorDate: Sun Jul 19 15:20:58 2020 +0300 Commit: Max Reitz <mreitz@xxxxxxxxxx> CommitDate: Tue Jul 21 10:49:02 2020 +0200 block/crypto: disallow write sharing by default My commit 'block/crypto: implement the encryption key management' accidently allowed raw luks images to be shared between different qemu processes without share-rw=on explicit override. Fix that. Fixes: bbfdae91fb ("block/crypto: implement the encryption key management") Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1857490 Signed-off-by: Maxim Levitsky <mlevitsk@xxxxxxxxxx> Message-Id: <20200719122059.59843-2-mlevitsk@xxxxxxxxxx> Signed-off-by: Max Reitz <mreitz@xxxxxxxxxx> --- block/crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/crypto.c b/block/crypto.c index 8725c1bc02..0807557763 100644 --- a/block/crypto.c +++ b/block/crypto.c @@ -881,7 +881,7 @@ block_crypto_child_perms(BlockDriverState *bs, BdrvChild *c, * For backward compatibility, manually share the write * and resize permission */ - *nshared |= (BLK_PERM_WRITE | BLK_PERM_RESIZE); + *nshared |= shared & (BLK_PERM_WRITE | BLK_PERM_RESIZE); /* * Since we are not fully a format driver, don't always request * the read/resize permission but only when explicitly -- generated by git-patchbot for /home/xen/git/qemu-xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |