Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3473744ybl; Mon, 27 Jan 2020 04:49:58 -0800 (PST) X-Google-Smtp-Source: APXvYqzm1LQ5tfRtYBzKtnMJkuOPPm1yZL52djlk8BKx+RBUMrBqW1+s19C5MAV+INi+GFgUWBsD X-Received: by 2002:a9d:4f15:: with SMTP id d21mr7083648otl.253.1580129398612; Mon, 27 Jan 2020 04:49:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580129398; cv=none; d=google.com; s=arc-20160816; b=AbERH1/3sg4BEL6Bmv2ngebHqhA8frpIFeDRQCpHc4wjhJK+/xSCkhLfCX/NJaJUcF P6h73wGUjrabHycEE6cuhpYpXgjpp9CD1HQkJVErf50Kj+cieb5jFqTwQO8uJnn/xIGH MidHTpOufDM3gsC/1Ao4eJN5klnd8lT11fiC4KkEZgijEkfYdCV7LjKylZ2q67WyCbSm Wsohlk+H5HZfZNiME0tLSAyeTuhQjloCtS+yLpPmSLvnwo6LLXAr0kESX7yTtjMnFcxL 8ofaj34Yf3sZA9nllG6bZC3QktLNWW53YbB7FcvIWW4/Jv7Bm2Pm7fBe/w3tIEg/8FMv 8k5g== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=TC/jbdNXZ2D9BmqUV22cZuRvRHGXN8uex0O3uaZCCB8=; b=aTjAR4SpjkLCg4B4uXxMIRWG9I3HVJPLzUymTyqa2JC5EJkinuHXwdhDBqwIn5ItaF GokNi/hRX+HHdGC1a8GhBbWAdoUxR5FRt387znPGpxv/q9bLmwLP2nZDQz3UYPiq4BRJ AKJD0hvZDWIp9JT0aS8xdH50TthyFByLn8sNZKzv3mE4kB5ubu2+aymMCsBju0crTDM/ pw8+ZCXwQUy0E1JPXAC7KV5kc28VW/7YeEkZlbW+s5/IeiOOS4IP9ti5mLeOuK0qy/b8 1+lahZVzt7y2K28AqnKiOVz3Sx6JBdVxjkARFLGN1pM2ZnCIGpIMvUVR1yjofGqV7Bsg T3rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@benyossef-com.20150623.gappssmtp.com header.s=20150623 header.b=fjmT4coy; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-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 m11si2253709oim.223.2020.01.27.04.49.40; Mon, 27 Jan 2020 04:49:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-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=@benyossef-com.20150623.gappssmtp.com header.s=20150623 header.b=fjmT4coy; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730205AbgA0M3r (ORCPT + 99 others); Mon, 27 Jan 2020 07:29:47 -0500 Received: from mail-ua1-f68.google.com ([209.85.222.68]:46473 "EHLO mail-ua1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730196AbgA0M3r (ORCPT ); Mon, 27 Jan 2020 07:29:47 -0500 Received: by mail-ua1-f68.google.com with SMTP id l6so3323854uap.13 for ; Mon, 27 Jan 2020 04:29:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=benyossef-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=TC/jbdNXZ2D9BmqUV22cZuRvRHGXN8uex0O3uaZCCB8=; b=fjmT4coyOvrBK2h+BPci1LCeVr+a3vWJX76FTYcFv0XlUFna4w2ZvTLMkrpnLlk3U0 cggT7NAylDCNPt4e1Vm+pkp3CwK78hBam+QsnfR1c2357YuiEfg7v2NwOHoZbupHRLYp s2jEJmwTzdD/jjqV4y5avgneVsl6BT08m4aBtn1GxU+tB7CWwEsCUA7OJAUf5LPopeSb bXLHbRx2Pi9DHFCtDa8MjxaeQm0e/BRVWnBRYHnTfL1VrdFCsNkESmT4fhLVi3B3u1xP wRE7JgaUHijwRdiTzb67S5GesN5QNqnqR4F5dUCEcqr5c9glGsa9qRwbs1ImHDBWN1y2 suLA== 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:content-transfer-encoding; bh=TC/jbdNXZ2D9BmqUV22cZuRvRHGXN8uex0O3uaZCCB8=; b=DWdtIQXKwYflaRu3X+8XKFWD5SKh6Zrj0wm3fm+X91ZCyEyNt0yPYJN/hBoBV2ReoZ InkruQceQq7YHp2wl55tY93M8W6WzUO23IeBnO9p4q2+Y7dtpYWVoe5aelY1A+A+r9bF yjsNAG0E1/VRVXyZiNWr5Ai3lEclSb4LhjEpN/Q/CFYeT6iPpYl1C6ARuR3qeLP0IBfB j5J/rVSl1pzjsHs8Kzho0SGkW/QfnqXrWN5VtFIu7SO1e9wI75Wkhh7zxGzE5Tr4Qdha Y6AAVnlOCspI3SMOsciK6N3i0KHh4su1HMkUrKBmaBFEhnBOxlp7H2elvuqjPK4UsNvk mDmw== X-Gm-Message-State: APjAAAUDYRhzDxF8eYs1QGWoo11Emx26VMPWwxfkDaaqcYD68LaHaWnR OG+LH7nhPsR8W2z5GIy718t416wUQDYoEJ7FuqtkF/DkmyqjEw== X-Received: by 2002:a9f:226d:: with SMTP id 100mr9338336uad.107.1580128186076; Mon, 27 Jan 2020 04:29:46 -0800 (PST) MIME-Version: 1.0 References: <20200126133805.20294-1-gilad@benyossef.com> In-Reply-To: From: Gilad Ben-Yossef Date: Mon, 27 Jan 2020 14:29:35 +0200 Message-ID: Subject: Re: [RFC] crypto: ccree - protect against short scatterlists To: Geert Uytterhoeven Cc: Herbert Xu , "David S. Miller" , Ofir Drang , Linux Crypto Mailing List , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Mon, Jan 27, 2020 at 10:03 AM Geert Uytterhoeven wrote: > > Hi Gilad, > > On Sun, Jan 26, 2020 at 2:38 PM Gilad Ben-Yossef wr= ote: > > Deal gracefully with the event of being handed a scatterlist > > which is shorter than expected. > > > > This mitigates a crash in some cases of crashes due to > > attempt to map empty (but not NULL) scatterlists with none > > zero lengths. > > > > This is an interim patch, to help diagnoze the issue, not > > intended for mainline in its current form as of yet. > > > > Signed-off-by: Gilad Ben-Yossef > > Reported-by: Geert Uytterhoeven > > Thanks for your patch! > > Unfortunately this doesn't make a difference, as ... OK, so this is a different case than the one I am seeing but similar in the sense that we get a scatterlist with a NULL first buffer, which aead.h says we shouldn't... Oh, well. Sorry, still waiting to get my R-Car board back. Please try the patch I'm about to send and see if it is better. Thanks, Gilad --=20 Gilad Ben-Yossef Chief Coffee Drinker values of =CE=B2 will give rise to dom!