All of lore.kernel.org
 help / color / mirror / Atom feed
From: TongZhang <ztong@vt.edu>
To: darrick.wong@oracle.com
Cc: linux-xfs@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	linux-security-module@vger.kernel.org,
	Wenbo Shen <shenwenbosmile@gmail.com>
Subject: Leaking Path in XFS's ioctl interface(missing LSM check)
Date: Tue, 25 Sep 2018 20:51:50 -0400	[thread overview]
Message-ID: <5EF0D46A-C098-4B51-AD13-225FFCA35D4C@vt.edu> (raw)

Hi,

I'm bringing up this issue again to let of LSM developers know the situation, and would like to know your thoughts.
Several weeks ago I sent an email to the security list to discuss the issue where
XFS's ioctl interface can do things like vfs_readlink without asking LSM's
permission, which we think is kind of weird and this kind of operation should be
audited by LSM.

see the original post below:

>We noticed a use of vfs_readlink() in xfs_file_ioctl(), which should have been checked by 
>security_inode_readlink().
>The callgraph is:
>	xfs_file_ioctl()->xfs_readlink_by_handle()->vfs_readlink()
>
>This path allows user to do things similar to SyS_readlinkat(), and the parameters
>are user controllable.

security_inode_readlink() is not used inside vfs_readlink()

- Tong


WARNING: multiple messages have this Message-ID (diff)
From: ztong@vt.edu (TongZhang)
To: linux-security-module@vger.kernel.org
Subject: Leaking Path in XFS's ioctl interface(missing LSM check)
Date: Tue, 25 Sep 2018 20:51:50 -0400	[thread overview]
Message-ID: <5EF0D46A-C098-4B51-AD13-225FFCA35D4C@vt.edu> (raw)

Hi,

I'm bringing up this issue again to let of LSM developers know the situation, and would like to know your thoughts.
Several weeks ago I sent an email to the security list to discuss the issue where
XFS's ioctl interface can do things like vfs_readlink without asking LSM's
permission, which we think is kind of weird and this kind of operation should be
audited by LSM.

see the original post below:

>We noticed a use of vfs_readlink() in xfs_file_ioctl(), which should have been checked by 
>security_inode_readlink().
>The callgraph is:
>	xfs_file_ioctl()->xfs_readlink_by_handle()->vfs_readlink()
>
>This path allows user to do things similar to SyS_readlinkat(), and the parameters
>are user controllable.

security_inode_readlink() is not used inside vfs_readlink()

- Tong

             reply	other threads:[~2018-09-26  0:51 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-26  0:51 TongZhang [this message]
2018-09-26  0:51 ` Leaking Path in XFS's ioctl interface(missing LSM check) TongZhang
2018-09-26  1:33 ` Dave Chinner
2018-09-26  1:33   ` Dave Chinner
2018-09-26 13:23   ` Stephen Smalley
2018-09-26 13:23     ` Stephen Smalley
2018-09-27  2:08     ` Dave Chinner
2018-09-27  2:08       ` Dave Chinner
2018-09-26 18:24   ` Alan Cox
2018-09-26 18:24     ` Alan Cox
2018-09-27  1:38     ` Dave Chinner
2018-09-27  1:38       ` Dave Chinner
2018-09-27 21:23       ` James Morris
2018-09-27 21:23         ` James Morris
2018-09-27 22:19         ` Dave Chinner
2018-09-27 22:19           ` Dave Chinner
2018-09-27 23:12           ` Tetsuo Handa
2018-09-27 23:12             ` Tetsuo Handa
2018-09-30 14:16       ` Alan Cox
2018-09-30 14:16         ` Alan Cox
2018-10-01  0:25         ` Dave Chinner
2018-10-01  0:25           ` Dave Chinner
2018-10-01 15:04           ` Alan Cox
2018-10-01 15:25             ` Theodore Y. Ts'o
2018-10-01 22:53               ` Dave Chinner
2018-10-01 15:44             ` Darrick J. Wong
2018-10-01 20:08               ` James Morris
2018-10-01 22:45                 ` Dave Chinner
2018-10-02 19:20                   ` James Morris
2018-10-02 22:42                     ` Dave Chinner

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=5EF0D46A-C098-4B51-AD13-225FFCA35D4C@vt.edu \
    --to=ztong@vt.edu \
    --cc=darrick.wong@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=shenwenbosmile@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.