Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2933996ybb; Sun, 22 Mar 2020 11:10:05 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs/uqSGUMjjQE+isZWTKrqZNWL+ED0ZwvFT004YgafIAcHkFfVa+j26hcXuJ7NfFkzTd/hw X-Received: by 2002:a05:6830:1087:: with SMTP id y7mr14866109oto.342.1584900605399; Sun, 22 Mar 2020 11:10:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584900605; cv=none; d=google.com; s=arc-20160816; b=UT5npeKeC6FAZ81A4z29h6IW/LAsyZiUiEBP7NbMfYhcKP6R9nImW84mDS3WRVGcap MCRGQmIyGdpf1wd3vWL81foqGm4QyuXP++KPfAEKPBfyOBsVR2CP6chUtrsP/POq2rc4 vOarj8RQY94fACYEUQ9AykAct3tDp0OpE0A2oGzNYYzmLdt0fCP7sTVPv8LBgvYnFksV rrUWU6SqHCDyYdx04i05g8+18uz/uNx017h2Xiu2uHl8+JaMv/BGkskHaP8iiKd59U3h mUxo0Ko5AOis3hafI1yTscFjdOifv9UPespJdpTDRpQOChxqe/YDjcvH/71cC3e93Alk sfeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=yTvliEH7UlRGfyqLty9qUsieVplfdzZRwgJiYEbPH7o=; b=PnnmVmFI95C+Z3212AZ5jEk8FiHy+knbAE6WiJ7CpF5feo4DDMrlPyCIvWM2jaAI9a FO7aiwzEs0Vtouz+tT9p1+JxEqy2iEtyXPHzLVgpNilFrAFC10kOtX8O+8y5C2Yv1XlC R1PvHWgUOvOL2+XdAWYJ+BoHk1PRsWZQQ9glBFbyt6EiE5dRShfYfiNJaJzkWG+dyqpl o4vGrpYEogVQ7upjr1X+I+cAUtcaiKYUxAqvjXvIweJo+H7i/c0bqSDLC2mku58whyMi +GvegiZWIpqxusmG/BLvc47XTow5z+PsshKj8VUaXBvd1ldvbID1q27N+up1JniPt+n3 nt4w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r23si6490288otq.255.2020.03.22.11.09.53; Sun, 22 Mar 2020 11:10:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726903AbgCVSIR (ORCPT + 99 others); Sun, 22 Mar 2020 14:08:17 -0400 Received: from mx2.suse.de ([195.135.220.15]:41510 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725785AbgCVSIR (ORCPT ); Sun, 22 Mar 2020 14:08:17 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 242A4AD8E; Sun, 22 Mar 2020 18:08:15 +0000 (UTC) Date: Sun, 22 Mar 2020 19:08:13 +0100 From: Jean Delvare To: Wolfram Sang Cc: Dan Carpenter , Daniel Kurtz , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, syzbot , Mika Westerberg , Andy Shevchenko , Jarkko Nikula Subject: Re: [PATCH] i2c: i801: Fix memory corruption in i801_isr_byte_done() Message-ID: <20200322190813.39b92de2@endymion> In-Reply-To: <20200320145748.GD1282@ninjato> References: <0000000000009586b2059c13c7e1@google.com> <20200114073406.qaq3hbrhtx76fkes@kili.mountain> <20200222124523.GI1716@kunai> <20200320145748.GD1282@ninjato> Organization: SUSE Linux X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Wolfram, Can you please bounce the previous messages in this thread to me? I was apparently not Cc'd so I'm missing the context. Thanks, Jean On Fri, 20 Mar 2020 15:57:48 +0100, Wolfram Sang wrote: > On Sat, Feb 22, 2020 at 01:45:23PM +0100, Wolfram Sang wrote: > > On Tue, Jan 14, 2020 at 10:34:06AM +0300, Dan Carpenter wrote: > > > Assigning "priv->data[-1] = priv->len;" obviously doesn't make sense. > > > What it does is it ends up corrupting the last byte of priv->len so > > > priv->len becomes a very high number. > > > > > > Reported-by: syzbot+ed71512d469895b5b34e@syzkaller.appspotmail.com > > > Fixes: d3ff6ce40031 ("i2c-i801: Enable IRQ for byte_by_byte transactions") > > > Signed-off-by: Dan Carpenter > > > --- > > > > Daniel, Jean: what do you think? > > Also, adding Jarkko to CC who works a lot with this driver... > > Ping. Adding more people... > > > > > > Untested. > > > > > > drivers/i2c/busses/i2c-i801.c | 1 - > > > 1 file changed, 1 deletion(-) > > > > > > diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c > > > index f5e69fe56532..420d8025901e 100644 > > > --- a/drivers/i2c/busses/i2c-i801.c > > > +++ b/drivers/i2c/busses/i2c-i801.c > > > @@ -584,7 +584,6 @@ static void i801_isr_byte_done(struct i801_priv *priv) > > > "SMBus block read size is %d\n", > > > priv->len); > > > } > > > - priv->data[-1] = priv->len; > > > } > > > > > > /* Read next byte */ > > > -- > > > 2.11.0 > > >