Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4082077img; Tue, 26 Mar 2019 02:36:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqxzG55vPhO+WoaxG0Mia04RrnDZ6GNzzcKwWdcON2kww9asAxoZN53ObIaPcoOp8pdoCgFy X-Received: by 2002:a63:2ec6:: with SMTP id u189mr102201pgu.170.1553593014204; Tue, 26 Mar 2019 02:36:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553593014; cv=none; d=google.com; s=arc-20160816; b=VwGaFpJU6mhBVuTWzSiJIKCo0EEINDByNzvuXHshodPliv2Fg9OWcAOXTjp8bGD7+u KgkdBavQBLpJQZUbkNe69buFL74QWNHRixgFDScThheUeTAST12pTRWSBgjwE0uW9lep yjK8xgZqmj8JXfEWNh//KXqo0uMxC6DMSI9f09HJFyn9cKOHq5HkPK30a6lzB2a0/2ZI YMcjrNAdUW6iiuLijmnL5lcYvEoKk80J7DDThlHb0s0zBxWw8gHo98DWHATm93bgNk9W VhT76t5HrUsR3LH9ToK/VcYUeU5Ev9IWiCQ4feCImGU8RU1rzfWYSLSA5YeSgqjY44wD 0vPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=bIY+fkbexVaxvXrS3bewaeA85IQDnRpprN8nuohZs88=; b=VxUYmquf/4iNrsB2Fjbsu2QAZ+1/BpaYqwzK5KYt+T2dDCLyKRK+69lG+qp5OjpJMA b+Wt4CKZ0DEZBd0XwggAfbytcoZg5jj8pOSSwZ2gak8S0V4lidfUo/Uq5EkyeCRdT6E5 C5q+B7PbJmWXAIwfqDvJ4ut+5gZGbwu5YDyKyZglmgvR1l28kgSpqb7WG8lH3/V+Wtwi b86rFUfICouu0eT79iBMO+md0w6zqHTni51pZTmLPy5fVqFQQ8d/Y6CKFVnjJNwgdQXA rad41HmHgy8ju7sw9SJoakx31HGtHxzF/V1h0PsInnju/XN6SFKDhPGNsMBL/ar7BYm0 hvWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f6pryCGz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z72si6039472pgd.401.2019.03.26.02.36.38; Tue, 26 Mar 2019 02:36:54 -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; dkim=pass header.i=@linaro.org header.s=google header.b=f6pryCGz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731065AbfCZJf7 (ORCPT + 99 others); Tue, 26 Mar 2019 05:35:59 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:41432 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726413AbfCZJf6 (ORCPT ); Tue, 26 Mar 2019 05:35:58 -0400 Received: by mail-oi1-f194.google.com with SMTP id v7so9365293oie.8 for ; Tue, 26 Mar 2019 02:35:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bIY+fkbexVaxvXrS3bewaeA85IQDnRpprN8nuohZs88=; b=f6pryCGzQ2y+gEknsl5UF05Xqv6hslVAz3pE1gT3bHORbG59psOxYQrjltTe1PohQZ nTchWO5Os421pnnGnbjUD2rM7flBH006aQ+khABdb5G/QLUpL9yxZ7egdK9Lm7nMzj9b d3iIiDxmYpV6cmaB0JfeX0sGBo9AkysCb/7NlYxZIjrZpEwZN27zCkhIaI0WJd7JjQhm OT7YjNA+ZwfOuiECzKmeVuIOyIpvWYuldCIfujPvXHV/FGKY8iKaX6EfJfShFVRo3DHX 9olOk+d/276rc+MF9EyvJSP9YBqg6a5rs6HtilsWSF4TEf08BeHo3S0SgLnNnlFAY1UA 8ABw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bIY+fkbexVaxvXrS3bewaeA85IQDnRpprN8nuohZs88=; b=tbXG/C45sGjhTfFqI+vVfoL4ILEQpN3FxR0mCSBc1Wvwwlt38tRiKS7meaUoaiugSg tttG+2xwLsTAd6xvuKeb4dItKXbpcmuuKBwMNv+5vUGU0NnpJp/CXlZgvn37ri+HGyIi FE6/CdOJvAMP4qm5ZhaLIAjjOvzA8rmCc/SQ0tAxFKavl6Knw22JgrqCMOTedSO2clJF 7a9ndHEBFIy6ec46F5n4/pYD5l/Jb9q1bbhgcAhauq6FABUAuCe0Rex7eWHYBsrS+I/r bCwxxFkWKinoF+ZLMoZFpY/uDOtCPmEQ98Tf36uwg0nD0o0ZBapfJI37hYyr0pooH92j +tPA== X-Gm-Message-State: APjAAAUTbZmrnq6x3b+fxCqQJ/NJrx9bMeJdvXzKY6DXlY8WuvblY2vX 8KgVWvQk5BlKvJoMXatGuBqooiJpQPRBvgDzyoowvQ== X-Received: by 2002:aca:b607:: with SMTP id g7mr759332oif.6.1553592958180; Tue, 26 Mar 2019 02:35:58 -0700 (PDT) MIME-Version: 1.0 References: <20190322154425.3852517-1-arnd@arndb.de> <20190322154425.3852517-5-arnd@arndb.de> <20190326011319.GC29420@kroah.com> In-Reply-To: From: Baolin Wang Date: Tue, 26 Mar 2019 17:35:46 +0800 Message-ID: Subject: Re: [BACKPORT 4.4.y 04/25] USB: iowarrior: fix oops with malicious USB descriptors To: Arnd Bergmann Cc: Greg Kroah-Hartman , "# 3.4.x" , Kees Cook , Sebastian Andrzej Siewior , "Gustavo A. R. Silva" , Josh Boyer , Ralf Spenneberg , USB list , Linux Kernel Mailing List , Chunyan Zhang , Baolin Wang , orson.zhai@unisoc.com, =?UTF-8?B?Q2h1bnlhbiBaaGFuZyAo5byg5pil6ImzKQ==?= Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 26 Mar 2019 at 16:21, Arnd Bergmann wrote: > > On Tue, Mar 26, 2019 at 2:23 AM Greg Kroah-Hartman > wrote: > > > > On Fri, Mar 22, 2019 at 04:43:55PM +0100, Arnd Bergmann wrote: > > > From: Josh Boyer > > > > > > The iowarrior driver expects at least one valid endpoint. If given > > > malicious descriptors that specify 0 for the number of endpoints, > > > it will crash in the probe function. Ensure there is at least > > > one endpoint on the interface before using it. > > > > > > The full report of this issue can be found here: > > > http://seclists.org/bugtraq/2016/Mar/87 > > > > > > Reported-by: Ralf Spenneberg > > > Cc: stable > > > Signed-off-by: Josh Boyer > > > Signed-off-by: Greg Kroah-Hartman > > > (cherry picked from commit 4ec0ef3a82125efc36173062a50624550a900ae0) > > > Signed-off-by: Arnd Bergmann > > > --- > > > drivers/usb/misc/iowarrior.c | 6 ++++++ > > > 1 file changed, 6 insertions(+) > > > > This commit has been in the tree for a long time. It was in the 4.4.7 > > release, back in April 2016. And then it was reverted in commit > > b7321e81fc36 ("USB: iowarrior: fix NULL-deref at probe") as it broke > > systems. So why add it back, the correct functionality should be there > > today, right? > > Sorry I missed that history. The script I used to identify patches noticed > that this patch was not applied, but I did not have a check for already- > reverted patches. > > Chunyan, Baolin: it seems the spreadtrum 4.4 kernel got this wrong > as well, by backporting the patch again on top of 4.4.172. Can you check > the latest internal version for this? Yes, I saw this patch in our 4.4 kernel. Orson, we should revert this patch from our kernel as Greg mentioned. -- Baolin Wang Best Regards