vt could allocate more than 2MB thus running over it's 2MB reserved
heap and stepping on the shared segment. testcase:
; vt
; aux/write
draw: events: ecanread stat error: segments overlap
the executable is actually allocating 2.8MB:
; ps -a|grep vt
quanstro 4235 0:00 0:00 2824K Pwrite vt
quanstro 4236 0:00 0:00 168K Pread vt
quanstro 4237 0:00 0:00 168K Pread vt
quanstro 4238 0:00 0:00 172K Pread vt
quanstro 4240 0:00 0:00 172K Pread vt
quanstro 4250 0:00 0:00 156K Pread grep vt
the solution is to let the system place the shared segment. the
rest of the patch is to make all the errors consctl fatal; only a
random subset had been.
i think that telnetd/telnet have similar code, though i don't
see with grep that they call malloc.
|