* [PATCH] fix info leak
@ 2003-07-18 1:57 Albert Cahalan
0 siblings, 0 replies; only message in thread
From: Albert Cahalan @ 2003-07-18 1:57 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton, Linus Torvalds
Here's a better fix for the kernel stack data
leaking out into user-space. (due to padding)
This fix takes advantage of the fact that an i386
machine is little-endian. The type of st_rdev may
be widened to fill the gap, causing the extra 2
bytes to get zeroed when st_rdev is written to.
Everybody: use -Wpadded to find these
--- old/include/asm-i386/stat.h 2003-06-26 17:50:47.000000000 -0400
+++ new/include/asm-i386/stat.h 2003-07-17 18:23:01.000000000 -0400
@@ -9,6 +9,6 @@
unsigned short st_uid;
unsigned short st_gid;
- unsigned short st_rdev;
+ unsigned int st_rdev;
unsigned long st_size;
unsigned long st_atime;
unsigned long st_mtime;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-07-18 1:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-18 1:57 [PATCH] fix info leak Albert Cahalan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox