public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Albert Cahalan <albert@users.sf.net>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@digeo.com>, Linus Torvalds <torvalds@osdl.org>
Subject: [PATCH] fix info leak
Date: 17 Jul 2003 21:57:48 -0400	[thread overview]
Message-ID: <1058493468.733.55.camel@cube> (raw)

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;




                 reply	other threads:[~2003-07-18  1:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1058493468.733.55.camel@cube \
    --to=albert@users.sf.net \
    --cc=akpm@digeo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox