mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
rpc: securely erase the message buffers
While only a couple of the message types include sensitive data, the overhead of calling secure erase is not noticable enough to worry about making the erasure selective per type. Thus it is simplest to unconditionally securely erase the buffer. Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
8868cb2f7c
commit
8ee8f0f828
@ -28,6 +28,7 @@
|
||||
#include "virlog.h"
|
||||
#include "virfile.h"
|
||||
#include "virutil.h"
|
||||
#include "virsecureerase.h"
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_RPC
|
||||
|
||||
@ -65,6 +66,7 @@ virNetMessageClearPayload(virNetMessage *msg)
|
||||
{
|
||||
virNetMessageClearFDs(msg);
|
||||
|
||||
virSecureErase(msg->buffer, msg->bufferLength);
|
||||
msg->bufferOffset = 0;
|
||||
msg->bufferLength = 0;
|
||||
VIR_FREE(msg->buffer);
|
||||
|
Loading…
x
Reference in New Issue
Block a user