Notice: We have migrated to GitLab launching 2024-05-01 see here:

#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 01/26/17 at 07:16:00 by Sebastian Huber


comment:2 Changed on 02/15/17 at 13:37:51 by Sebastian Huber

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