This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [hurd,commited] hurd: Fix buffer overrun in __if_nametoindex


On Tue, 3 Apr 2018, Samuel Thibault wrote:

> and building with mainline GCC which reports it.
> 
> 	* sysdeps/mach/hurd/if_index.c (__if_nametoindex): Always end
> 	ifr.fr_name with a NUL caracter.

Are you sure this truncation is correct?  The conclusion we reached for 
the Linux version was to check for a too-big length and return an ENODEV 
error in that case, instead.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]