aboutsummaryrefslogtreecommitdiff
path: root/os-posix.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2020-11-30 11:56:13 +0100
committerDaniel P. Berrangé <berrange@redhat.com>2021-01-29 17:07:53 +0000
commit668cb74b2af1129349a6c41763bc88d801161e09 (patch)
tree3160d1c4426cd4c1c7a1ececb58b910229ab57aa /os-posix.c
parent31b6aefdbd9d2fe45c25e5236e1cc363229cb96c (diff)
downloadqemu-668cb74b2af1129349a6c41763bc88d801161e09.zip
qemu-668cb74b2af1129349a6c41763bc88d801161e09.tar.gz
qemu-668cb74b2af1129349a6c41763bc88d801161e09.tar.bz2
crypto: Forbid broken unloading of secrets
qcrypto_secret_prop_set_loaded() forgets to reset secret->rawdata after unloading a secret, which will lead to a double free at some point. Because there is no use case for unloading an already loaded secret (apart from deleting the whole secret object) and we know that nobody could use this because it would lead to crashes, let's just forbid the operation instead of fixing the unloading. Eventually, we'll want to get rid of 'loaded' in the external interface, but for the meantime this is more consistent with rng, which has a similar property 'opened' that also can't be reset to false after it became true. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'os-posix.c')
0 files changed, 0 insertions, 0 deletions