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: <CACPK8XcNXOL6620QYB1oJeKP05eqhnWyQovLGzVy3ZY=w=ndKg@mail.gmail.com>
Date:   Fri, 17 Feb 2017 13:12:17 +1030
From:   Joel Stanley <joel@....id.au>
To:     Cyril Bur <cyrilbur@...il.com>
Cc:     Greg KH <gregkh@...uxfoundation.org>, linux-kernel@...r.kernel.org,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Michael Neuling <mikey@...ling.org>,
        OpenBMC Maillist <openbmc@...ts.ozlabs.org>
Subject: Re: [PATCH v5] drivers/misc: Add Aspeed LPC control driver

On Tue, Feb 14, 2017 at 5:00 PM, Cyril Bur <cyrilbur@...il.com> wrote:
> diff --git a/drivers/misc/aspeed-lpc-ctrl.c b/drivers/misc/aspeed-lpc-ctrl.c
> new file mode 100644
> index 000000000000..9b51548e9d81
> --- /dev/null
> +++ b/drivers/misc/aspeed-lpc-ctrl.c

> +static long aspeed_lpc_ctrl_ioctl(struct file *file, unsigned int cmd,
> +               unsigned long param)
> +{
> +       struct aspeed_lpc_ctrl *lpc_ctrl = file_aspeed_lpc_ctrl(file);
> +       void __user *p = (void __user *)param;
> +       struct aspeed_lpc_ctrl_mapping map;
> +       u32 addr;
> +       u32 size;
> +       long rc;
> +
> +       if (copy_from_user(&map, p, sizeof(map)))
> +               return -EFAULT;

The structure you pass has a flags field that is currently unused. You
should check the value of map->flags here and reject non-zero values.

Once you fix that I think it's in good shape.

Cheers,

Joel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ