Re: [PATCH] IB/mlx5: Fix leaking stack memory to userspace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Aug 12, 2018 at 11:11:17AM -0600, Jason Gunthorpe wrote:
> On Sat, Aug 11, 2018 at 10:43:42AM +0300, Leon Romanovsky wrote:
> > On Thu, Aug 09, 2018 at 03:06:55PM -0600, Jason Gunthorpe wrote:
> > > mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes
> > > were written. Static checkers missed this because the struct was
> > > un-necessarily created in a different function, so consolidate that too.
> > >
> > > Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp")
> > > Cc: <stable@xxxxxxxxxxxxxxx>
> > > Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx>
> > > ---
> >
> > Except that mentioned "Fixes" is not related and patch subject is
> > misleading.
>
> The patch in fixes created the bug by extending the structure and
> not intializing the new fields.

New fields == "reserved". No one should care about the value in that
field.

>
> > Userspace simply see garbage memory which belongs to
> > mlx5_ib_create_qp_resp and not to "stack memory".
>
> mlx5_ib_create_qp_resp is allocated on the stack, so it is properly
> called kernel "stack memory"

So what about to omit "stack" word? Let's write it "Prevent from user
malicious access to physical memory".

Technically, it is right, but doesn't make any sense, exactly as "stack
memory", but who cares as long as it sounds right.

Jason, whatever, the change is fine by me and the code is more important
to me than proper commit message.

Thanks

>
> Jason

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux