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]
Date:   Fri, 31 Dec 2021 01:26:36 +0300
From:   Pavel Skripkin <paskripkin@...il.com>
To:     Wolfram Sang <wsa@...nel.org>, viro@...iv.linux.org.uk,
        linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
        syzbot+e417648b303855b91d8a@...kaller.appspotmail.com
Subject: Re: [PATCH v2] i2c: don't pass 0 nmsgs to i2c_transfer

On 12/31/21 01:20, Wolfram Sang wrote:
>> -		if (rdwr_arg.nmsgs > I2C_RDWR_IOCTL_MAX_MSGS)
>> +		if (!rdwr_arg.nmsgs || rdwr_arg.nmsgs > I2C_RDWR_IOCTL_MAX_MSGS)
>>  			return -EINVAL;
> 
> Shouldn't we check the msgs pointer as well while we are here? Like in
> the non-compat IOCTL code:
> 
> 443  if (!rdwr_arg.msgs || rdwr_arg.nmsgs == 0)
> 444          return -EINVAL;
> 
> 

Sure! Will prepare v2, thanks for review


With regards,
Pavel Skripkin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ