lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADLLry6yf1a_8ruR=DV78hUdgNAi+kN8ReciEgwjozjahpCgrQ@mail.gmail.com>
Date:   Fri, 30 Aug 2019 23:53:06 +0900
From:   Austin Kim <austindh.kim@...il.com>
To:     "Darrick J. Wong" <darrick.wong@...cle.com>
Cc:     linux-xfs@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] xfs: Initialize label array properly

2019년 8월 30일 (금) 오후 2:39, Darrick J. Wong <darrick.wong@...cle.com>님이 작성:
>
> On Fri, Aug 30, 2019 at 02:37:07PM +0900, Austin Kim wrote:
> > In case kernel stack variable is not initialized properly,
> > there is a risk of kernel information disclosure.
> >
> > So, initialize 'char label[]' array with null characters.
>
> Got a testcase for this?  At least a couple other filesystems implement
> this ioctl too, which means they all should be checked/tested on a
> regular basis.

Thanks for feedback.
As you pointed out, I figured out ioctl(e.g: ext4_ioctl, f2fs_ioctl)
of other file system is implemented with the same ways.
Please ignore the patch in this mail thread.

BR,
Austin Kim

>
> --D
>
> > Signed-off-by: Austin Kim <austindh.kim@...il.com>
> > ---
> >  fs/xfs/xfs_ioctl.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
> > index 9ea5166..09b3bee 100644
> > --- a/fs/xfs/xfs_ioctl.c
> > +++ b/fs/xfs/xfs_ioctl.c
> > @@ -2037,7 +2037,7 @@ xfs_ioc_setlabel(
> >       char                    __user *newlabel)
> >  {
> >       struct xfs_sb           *sbp = &mp->m_sb;
> > -     char                    label[XFSLABEL_MAX + 1];
> > +     char                    label[XFSLABEL_MAX + 1] = {0};
> >       size_t                  len;
> >       int                     error;
> >
> > --
> > 2.6.2
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ