NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-pmax/59234: pmax/stand/netboot build fails with "buffer overflow detected"



The following reply was made to PR port-pmax/59234; it has been noted by GNATS.

From: mlelstv%serpens.de@localhost (Michael van Elst)
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: port-pmax/59234: pmax/stand/netboot build fails with "buffer overflow detected"
Date: Sun, 30 Mar 2025 06:12:34 -0000 (UTC)

 tsutsui%ceres.dti.ne.jp@localhost (Izumi Tsutsui) writes:
 
 >writing syms at offset 0x12100
 >*** buffer overflow detected ***: terminated
 >Aborted (core dumped)
 
 >The message "*** buffer overflow detected ***" seems from
 >__strcpy_chk() so "malloc(elfp->stringsize)" in translate_syms()
 >is not enough?
 
 
 A string table is allowed to reference strings multiple times
 (maybe not possible for symbol names) and also to reference
 substrings (so names like 'bar\0' and 'foobar\0' may overlap).
 
 No idea if a compiler or linker would create such a thing. But
 if that is true, you need to iterate twice over the symbols
 to determine the target size and to copy the strings.
 


Home | Main Index | Thread Index | Old Index