kernel stack corruption -- where'd the deadbeef go? with 2.0.29

Greg Alexander (galexand@sietch.bloomington.in.us)
Mon, 2 Jun 1997 13:44:15 -0500 (EST)


If I reboot and then (after a little fiddling to make ll++) run:
strace -o thingy strip ll++
(ll++ is a bloated 960k C++ program with lots of debugging info)
I got a:
release: strip kernel stack corruption. Aiee
message. I assume this means that my stack overflowed and overwrote the
0xdeadbeef on the end and then started mucking random memory, right? The
strace thingy shows that ll++ did execute the _exit(0) syscall so I guess
that means it wasn't detected until ll++ exited.
I was running pppd at the time to connect to my ISP. I had to
hangup and rerun pppd and pppd was acting funny...I checked /etc/ppp/options
and towards the end it had some icky-poo-nasty corruption starting at byte
4096 in the file and extending up to byte 3906. I assume that means we
overflowed 190 bytes past the end of the stack and we were a bit unlucky to
have a disk cache there. Fix the corrupted area, everything's fine. Since
it was only read-cached, I assume that flushing the cache woulda worked as
well.
What may be related: I have the ext2fs compression patch installed.
ll++, etc. were not compressed. However, my strip binary is compressed.
I'm considering it likely that the decompression routines were not made for
a fixed-length stack and thus some pattern in strip causes them to go
overboard.
I'm going to try to get Mingo's 2.1 patch for kernel stack
corruption-detection to work and see what that gives me. If anyone knows
where the 2-page stack patches have went, I'd like to know, I can't find
them on www.linuxhq.com.

On the thought that it would only work the first time I ran strip
because it was cached after that, I decompressed strip and rebooted. No
error. I then recompressed strip and rebooted and no error. I don't know.
Overall, though, it's still my opinion that ext2fs compression patches were
not designed to be in the kernel and therefore should not!

Greg Alexander
http://www.cia-g.com/~sietch/
----
"I read about monkeys in the encyclopedia as soon as I got home from the
funeral and I wonder if this one throws turds and masturbates all the time
like those monkeys saw it the zoo in San Francisco or if witness monkeys are
more like people."
-- a character in Orson Scott Card and Kathryn H. Kidd's novel,
Lovelock.