Page MenuHomeFreeBSD

libnv: fix heap overflow in nvlist_recv()
Needs ReviewPublic

Authored by oshogbo on Fri, Apr 10, 9:28 AM.

Details

Reviewers
markj
Summary

nvlist_check_header() validated nvlh_size for overflow before
performing conversion. An mallicous user can set
NV_FLAG_BIG_ENDIAN in the header and craft nvlh_size so that
the orginall value passes the check, but after the conversion the
sizeof(nvlist_header) + size can overflow.
This can lead to a heap buffer overflow.

Diff Detail

Repository
rG FreeBSD src repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 72100
Build 68983: arc lint + arc unit

Event Timeline

The commit log should include a "Fixes" tag. Presumably it also deserves an SA and a regression test?