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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAG48ez2nLELb0bvK_SkQZuLLReaohZbk9yjMnyC7AYHJdtEEnw@mail.gmail.com>
Date:   Mon, 9 Jul 2018 14:22:14 +0200
From:   Jann Horn <jannh@...gle.com>
To:     leon@...nel.org
Cc:     dledford@...hat.com, jgg@...pe.ca, linux-rdma@...r.kernel.org,
        kernel list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] IB/mlx5: fix uaccess beyond "count" in debugfs
 read/write handlers

On Sun, Jul 8, 2018 at 8:56 AM Leon Romanovsky <leon@...nel.org> wrote:
>
> On Fri, Jul 06, 2018 at 10:48:03PM +0200, Jann Horn wrote:
> > In general, accessing userspace memory beyond the length of the supplied
> > buffer in VFS read/write handlers can lead to both kernel memory corruption
> > (via kernel_read()/kernel_write(), which can e.g. be triggered via
> > sys_splice()) and privilege escalation inside userspace.
> >
> > In this case, the affected files are in debugfs (and should therefore only
> > be accessible to root), and the read handlers check that *pos is zero
> > (meaning that at least sys_splice() can't trigger kernel memory
> > corruption). Because of the root requirement, this is not a security fix,
> > but rather a cleanup.
> >
> > For the read handlers, fix it by using simple_read_from_buffer() instead of
> > custom logic. Add min() calls to the write handlers.
> >
> > changed in v2:
> >  - also fix write handlers
>
> No changelog in commit messages, please

I will try to do that better in the future. I never noticed that
changelogs go below the three dashes...

> > Fixes: 4a2da0b8c078 ("IB/mlx5: Add debug control parameters for congestion control")
> > Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters")
> > Signed-off-by: Jann Horn <jannh@...gle.com>
> > ---
> >  drivers/infiniband/hw/mlx5/cong.c |  9 +--------
> >  drivers/infiniband/hw/mlx5/mr.c   | 32 ++++++++-----------------------
> >  2 files changed, 9 insertions(+), 32 deletions(-)
> >
>
> Thanks,
> Reviewed-by: Leon Romanovsky <leonro@...lanox.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ