#2427 assigned defect

cpukit/libnetworking/libc/getifaddrs.c: Undefined behavior on freeing auto variable if NET_RT_IFLIST isn't defined

Reported by: Martin Galvan Owned by: Needs Funding
Priority: normal Milestone: Indefinite
Component: unspecified Version: 4.11
Severity: normal Keywords:
Cc: Joel Sherrill, Gedare Bloom Blocked By:


The 'buf' variable in the getifaddrs function may be defined either as a pointer or as an array, depending on whether NET_RT_IFLIST is defined. However, we end up doing a free(buf) in both cases.

While this is FreeBSD code, we're maintaining it for now as an in-tree fork of the upstream so we should fix this.

Change History (2)

comment:1 Changed on Jan 26, 2017 at 7:16:00 AM by Sebastian Huber


comment:2 Changed on Feb 15, 2017 at 1:37:51 PM by Sebastian Huber

Milestone: 4.11.2Indefinite
Owner: set to Needs Funding
Status: newassigned
Note: See TracTickets for help on using tickets.