Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1500692imm; Fri, 6 Jul 2018 01:00:00 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcijuL3gZuDKEl7solcR7KmpnHS5zc+fNnD0SOYQps8pdNcqy0ZdGELtiOCrdnTMO1Wef2w X-Received: by 2002:a63:440a:: with SMTP id r10-v6mr8411692pga.27.1530864000083; Fri, 06 Jul 2018 01:00:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530864000; cv=none; d=google.com; s=arc-20160816; b=EGClPL6NqJNQKvOrn1nTCWDQViTIcObS8wkhsSclRouG1IKFM1oC54/Pd40KIgj/YL oXVH8fmVUUDvOCjspBoXGZTJ6f/VA9pcTnHGud+pHJWMt9CA9jQHN0mSCCSrkh65TbjB xrvlsuLNPWtvWuhD4KwYcOcJq+d7c87niYQDLxkDPHwBLStOW1MCEWo6iKIqmZHO0zg7 /pqP/pRxpjjJUB1xVYRqrgufY8iSST/4IVpKa8vxdKQxNQx3MXfLX3DKuTjDvZFecV5R kUyGG+ts2rJQKZPX8uPm0XDnufrN4DIkCfkmYD+pH7KaXvTpZLrvRIa2eP0Hxrj71+is 2sSQ== 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:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=7uS9OUKoYRQr3Vrm3L0TKXO5oWAwBIe1/VHygnpRUFU=; b=yspGFp3YMY9NamPRDwyqslWZJvHBHzRwpUNdRA11xdGFOz+TgbnuXu7rioByFD5Igu HUaak7bWP+EreucSOsH50ObPJU1UCip/sf0HK/EzOaKMue//4dBEuJL3jLVqe6dAAb2F +rabMX/jrLetAKAhf8G2jWs6OiHQW5IFYMhxhn40Xs75G8lGJcjuazqqFXNB4TFrKaxN C7iZtDfYeKel2+6a0sFVzOvF8vowIfyzoUm1RbZYeGh3MGhNrwKaO4UsHooaSBjmx+3P HsLlhaMxF1ChmKrBBWeB6Khxyk7PymDYFnm/dct5TLagXGO6yPpCvJGiNZ5IJ7ilMAxT 5EDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=odHgPQD6; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j17-v6si7675017pfj.104.2018.07.06.00.59.45; Fri, 06 Jul 2018 01:00:00 -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=@google.com header.s=20161025 header.b=odHgPQD6; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753061AbeGFH6d (ORCPT + 99 others); Fri, 6 Jul 2018 03:58:33 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:39832 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751185AbeGFH6b (ORCPT ); Fri, 6 Jul 2018 03:58:31 -0400 Received: by mail-pf0-f194.google.com with SMTP id s21-v6so7757093pfm.6 for ; Fri, 06 Jul 2018 00:58:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=7uS9OUKoYRQr3Vrm3L0TKXO5oWAwBIe1/VHygnpRUFU=; b=odHgPQD6IoZsOdsuGGjQueNzMPOWuG7EAJGmqTdtVdJS9S2SS0V4iw5zHhD/LQ3SS3 GMc58uGbgaUvSW91+UZJ9oHJzosvdC4M18VG0NZVz/SOsJ6lpjZ2I5PtOm0rbpHmbZwm 82DVpa4luRtBParfC4n0hgFBsObiQLn4Ptra/o6LS7fWb0M2OE7K4w068HwxZd5xjbdg VTYPpYPJHXd+ltmJ+zNnxz/zN9vDSR+2bgtfBBp98mbXsGype18QVhcTemub7HHTTe4v Pjf3AlMgdQmVEXU0s2yAF8ilqbmBohP81r6QEj1GVIDHO2g96ZZ6MM1oqaHjFiNThTv8 owSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=7uS9OUKoYRQr3Vrm3L0TKXO5oWAwBIe1/VHygnpRUFU=; b=Wh2CLiq471obppIrZ4KmSgC/DOnhSzAD2A97nDt6mUwgEaZvJfXHIs3nYKNLy7TGEy qjRw4uWwgplYN2jS9OOnbEJusLrgu9QICGWIrBOrE749LDIi70niPCRfy7LR8ifhAMn2 PQ/6ogusaXAw0qjUVI9+DdKHmU9dfvi/NrAdnKu40vNnQX8VtJqUM2S0Di0c3QihkhGD MkjWKTk3z03yXTDnnCeethsdW8Q3mYd7BH32Hb7E6v80SD9+KhWFnDDX6+pUkO98Cb5D /eptQS1pIZPmj7NTnHqQaqllDnqBhV/DBAZFda8Mv622CmJXv1lBVHzrWiE5wIIvCzXj yqoQ== X-Gm-Message-State: APt69E1I9HN0UzTV27lmrtVahke/Ewz3piyWQQV9S49CROnhIyhIzOqt c6P04J3xtz9NCYTZdtrC/a3+f7xQorJdU3tdsZuDxaY1mwA= X-Received: by 2002:a63:b43:: with SMTP id a3-v6mr7505187pgl.50.1530863910841; Fri, 06 Jul 2018 00:58:30 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a17:90a:d581:0:0:0:0 with HTTP; Fri, 6 Jul 2018 00:58:10 -0700 (PDT) In-Reply-To: <1616306.R4SzcgHSdy@positron.chronox.de> References: <00000000000092ad87056950ef9e@google.com> <1616306.R4SzcgHSdy@positron.chronox.de> From: Dmitry Vyukov Date: Fri, 6 Jul 2018 09:58:10 +0200 Message-ID: Subject: Re: [PATCH v3] AF_ALG: Initialize sg_num_bytes in error code path To: =?UTF-8?Q?Stephan_M=C3=BCller?= Cc: syzbot , David Miller , Herbert Xu , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , LKML , syzkaller-bugs Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 6, 2018 at 9:50 AM, Stephan M=C3=BCller w= rote: > Changes v3: > * Fix syz testing line Just in case, the syz test does not have to be in the patch. Just an email to the syzbot address will do. > Changes v2: > * Addition of syz testing line > > ---8<--- > > The RX SGL in processing is already registered with the RX SGL tracking > list to support proper cleanup. The cleanup code path uses the > sg_num_bytes variable which must therefore be always initialized, even > in the error code path. > > Signed-off-by: Stephan Mueller > Reported-by: syzbot+9c251bdd09f83b92ba95@syzkaller.appspotmail.com > #syz test: https://github.com/google/kmsan.git master > --- > crypto/af_alg.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/crypto/af_alg.c b/crypto/af_alg.c > index 49fa8582138b..bd6795ff406a 100644 > --- a/crypto/af_alg.c > +++ b/crypto/af_alg.c > @@ -1148,8 +1148,10 @@ int af_alg_get_rsgl(struct sock *sk, struct msghdr= *msg, int flags, > > /* make one iovec available as scatterlist */ > err =3D af_alg_make_sg(&rsgl->sgl, &msg->msg_iter, seglen= ); > - if (err < 0) > + if (err < 0) { > + rsgl->sg_num_bytes =3D 0; > return err; > + } > > /* chain the new scatterlist with previous one */ > if (areq->last_rsgl) > -- > 2.17.1 > > > > > -- > You received this message because you are subscribed to the Google Groups= "syzkaller-bugs" group. > To unsubscribe from this group and stop receiving emails from it, send an= email to syzkaller-bugs+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgi= d/syzkaller-bugs/1616306.R4SzcgHSdy%40positron.chronox.de. > For more options, visit https://groups.google.com/d/optout.