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: <YoRuTN3q2WqruIaR@google.com>
Date:   Wed, 18 May 2022 11:55:56 +0800
From:   Tzung-Bi Shih <tzungbi@...nel.org>
To:     Yuanjun Gong <ruc_gongyuanjun@....com>
Cc:     Benson Leung <bleung@...omium.org>,
        chrome-platform@...ts.linux.dev, linux-kernel@...r.kernel.org,
        stable@...r.kernel.org
Subject: Re: [PATCH 1/1] platform/chrome: check *dest of memcpy

On Tue, May 17, 2022 at 05:55:21PM +0800, Yuanjun Gong wrote:
> From: Gong Yuanjun <ruc_gongyuanjun@....com>
> 
> In regulator/cros-ec-regulator.c, cros_ec_cmd is sometimes called
> with *indata set to NULL.
> 
> static int cros_ec_regulator_enable(struct regulator_dev *dev){
> ...
>      cros_ec_cmd(data->ec_dev, 0, EC_CMD_REGULATOR_ENABLE, &cmd,
> 			  sizeof(cmd), NULL, 0)
> ...}
> 
> Don't do memcpy if indata is NULL.

The fix makes less sense to me.  Did you find somewhere that `indata` is NULL
but `insize` is not 0?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ