public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: bnaujok@sgi.com (Barry Naujok)
To: xfs@oss.sgi.com
Subject: TAKE - xfsprogs: pad ustat struct for mount check to avoid corruption
Date: Tue,  2 Dec 2008 12:20:09 +1100 (EST)	[thread overview]
Message-ID: <20081202012010.217DA58ADBF6@chook.melbourne.sgi.com> (raw)

Linux kernels (at least up until 2.6.27) are lacking compat sys_ustat
handlers on some platforms (notably PPC) so that if called from 32 bits
on a 64-bit kernel, the kernel will copy out too much (32 bytes onto a
20-byte structure):
 
[root@xero xfstests]# xfs_logprint /dev/loop0
xfs_logprint:
*** stack smashing detected ***: xfs_logprint terminated
Aborted
 
This will be fixed upstream, but for the benefit of older kernels we
may want to guard against this by padding the structure we pass into
the syscall.   We don't care about the values anyway, just the return
value.
 
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>


Date:  Tue Dec  2 12:17:58 EST 2008
Workarea:  chook.melbourne.sgi.com:/home/bnaujok/isms/xcmds-clean
Inspected by:  Eric Sandeen <sandeen@sandeen.net>

The following file(s) were checked into:
  longdrop.melbourne.sgi.com:/isms/xfs-cmds/master-melb


Modid:  master-melb:xfs-cmds:32618a
xfsprogs/libxfs/linux.c - 1.19 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfsprogs/libxfs/linux.c.diff?r1=text&tr1=1.19&r2=text&tr2=1.18&f=h
	- Pad ustat struct to avoid stack corruption


_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

                 reply	other threads:[~2008-12-02  1:20 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=20081202012010.217DA58ADBF6@chook.melbourne.sgi.com \
    --to=bnaujok@sgi.com \
    --cc=xfs@oss.sgi.com \
    /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