mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user