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-next>] [day] [month] [year] [list]
Message-ID: <CAGXu5jKiKA79mnTwCxTKsXBBKAvaoaX=CH61pLXdxtWQvUhhuQ@mail.gmail.com>
Date:   Tue, 8 Jan 2019 15:41:22 -0800
From:   Kees Cook <keescook@...omium.org>
To:     Vlad Tsyrklevich <vlad@...rklevich.net>,
        Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
Cc:     linux-fbdev@...r.kernel.org,
        Security Officers <security@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Fix stack memory disclosure

On Sat, Jan 5, 2019 at 11:51 PM Vlad Tsyrklevich <vlad@...rklevich.net> wrote:
>
> Using [1] for static analysis I found that the OMAPFB_QUERY_PLANE,
> OMAPFB_GET_COLOR_KEY, OMAPFB_GET_DISPLAY_INFO, and OMAPFB_GET_VRAM_INFO
> cases could all leak uninitialized stack memory--either due to
> uninitialized padding or 'reserved' fields.
>
> Fix them by clearing the shared union used to store copied out data.
>
> [1] https://github.com/vlad902/kernel-uninitialized-memory-checker
>
> Signed-off-by: Vlad Tsyrklevich <vlad@...rklevich.net>

Reviewed-by: Kees Cook <keescook@...omium.org>
Fixes: b39a982ddecf ("OMAP: DSS2: omapfb driver")

Since this driver is orphaned (according to MAINTAINERS), I think this
fix should go via Bart's tree. Bart, can you take this?

-Kees

> Cc: security@...nel.org
>
> ---
>  drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c b/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c
> index 53f93616c..8e23160ec 100644
> --- a/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c
> +++ b/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c
> @@ -609,6 +609,8 @@ int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg)
>
>         int r = 0;
>
> +       memset(&p, 0, sizeof(p));
> +
>         switch (cmd) {
>         case OMAPFB_SYNC_GFX:
>                 DBG("ioctl SYNC_GFX\n");
> --
> 2.17.0
>


-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ