Page MenuHomeFreeBSD

hastd: Ensure nvpair padding is initialized
AcceptedPublic

Authored by des on Thu, Sep 3, 3:18 PM.

Details

Summary

The proto-libnv implementation embedded in hastd pads names and values
out to the nearest multiple of eight bytes, but leaves the padding
uninitialized, leaking up to 14 bytes of recycled heap per pair in a
message.

While here, switch from bcopy() to memcpy().

MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 76426
Build 73309: arc lint + arc unit