Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp534687lqt; Thu, 6 Jun 2024 10:24:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV12c2yrCLtlAtRhEACInbaiEtPd3UtXg8XoucTJs7ie/Hp7vCbehysqL6gWIvyfKkEjm2vJdOhnnB2re/2PYrPkmmiLOuvwEpEvYPquA== X-Google-Smtp-Source: AGHT+IHgguKLcwftFQWApAMKl061EYsHsDjk2tdls7Tfeu/1rQBUPLmhMMJj3eItWfDLiWH6oCMi X-Received: by 2002:a05:6a21:32aa:b0:1ad:3d93:b71e with SMTP id adf61e73a8af0-1b2f9e1451amr218378637.59.1717694666969; Thu, 06 Jun 2024 10:24:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717694666; cv=pass; d=google.com; s=arc-20160816; b=HLTHQ402fdZCXMkh/RelUT/EJD5rEQelvjiPjqh0Lo6Z6rgB7n6A0/dufdz5FKydSe UPzYq40n6HFl95O5apo3WStN61eIbzrVxhgCHqV0S+dPbj2dI+9POERTUdf+suVs9H+t +4Hyd8cSjy/j/eNFfm6qDl/wTjqru+kJcjp/WsbX0q7J7nAvi606XSn8kPKgVWuS/lTp m9kYvuf8Sgg55Jz6Xi5fB3ELCgd33IRX0LO3/sgTV8XhzL3Aq1zU+bxZJ78t7zvKyaJF 4X1F313Zbq4hjcxcP98dgWuDrbnS3RB0jQZPh1fArlGtCkDsYFMoQkwlHDtUu05UjO71 e6fg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=EBzQ8negayjPzH4I927JPLD9bGZumwIM1r0NZmwJJnc=; fh=afjOQLx3PdCr9TpubNM+mfR6l31QiIPejMzJ0Wit40I=; b=dcZOoMSlUKsHwKmk9bo3RpiS7tTT0385vrRM2raybMnENoHaVjkMh9loGoqJOGTMLZ bKtMoxk+6PqF4b9nvjRlQ5UDlPQ0N+jidwFhr744yncJiGWLKKJ3cwTxCkb0+WFoY3uy Po0QnhY/3bn2Lz5pwL5fchYiPxDpxEqMNLkZ8YKVhKUL5w9WD6HQMHN+wtF2lN9l9CpZ TS+lpKPgn2xz4g4254uuwB9dmpQLkHHXSCxsRwtwVBut7gcmLVZo/pc3vU+8BjUqb0z5 UL0h6nJIlFcdbei2w2pDkVRPRYHsnfnHfCl+GVp9rNJwzeVeUJcNR4paRAV7pqA08Zju 6Amw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=SzwQUBHQ; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-crypto+bounces-4790-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4790-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-703fd3af121si1413673b3a.87.2024.06.06.10.24.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 10:24:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-4790-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=SzwQUBHQ; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-crypto+bounces-4790-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4790-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 49359287D7D for ; Thu, 6 Jun 2024 17:21:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9EC951990A1; Thu, 6 Jun 2024 17:21:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SzwQUBHQ" X-Original-To: linux-crypto@vger.kernel.org Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 00D92198E90; Thu, 6 Jun 2024 17:21:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717694466; cv=none; b=Nj8zWMF7bWxluG9A8Z1MMFQCKh30IWVczrVvHDIKOBvKg9WbxR9kpGDJarAhjGLMCtHQvdnuGf2b1ZbYOdB45c8iv//6MLsIIeJTwe4s9lEpldiK1CWhHyDzL3o3hgldpe5aoCpYY4mrw0cQG2gj9IpwSkDeGqpl7vja3hJOeHU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717694466; c=relaxed/simple; bh=Ot9A6SeA8dAsQwHKsNxRkFPhOuP4b68dsYRTMjNGsNg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=kQTmHGPWvHeAbmqrpvf8dS/MDhMRN7wsudpfhcQ+RQyFm7FB957iUOtxHTDaMzaiHZyWT7cGNdnxkbgL4SIulpJPy4uPWuLzHPWWxxfvXxUfRN6pob517SJN7YOf3aXAPQy6gLq9jLck1WnSEDByUQZ3h3dQXTtQ4/8AFePw0WE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=SzwQUBHQ; arc=none smtp.client-ip=209.85.167.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-5295e488248so1504345e87.2; Thu, 06 Jun 2024 10:21:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717694463; x=1718299263; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=EBzQ8negayjPzH4I927JPLD9bGZumwIM1r0NZmwJJnc=; b=SzwQUBHQFxefchAPAscBLcY4DQdC6AdCaYNLNdvEv+EtHkgdaRyoSs+bRaFlidUWsL t/LeWqR8uABmirPdimWpbYSLs8/pkl3yQQgDtJqOS2MRNz5fvM2Mn7r6EVEKNMLmH3ec rDhB4Xb1m6Mgrplgbhjl4/viuzuJ0S8wN/pQZhfjlXc9Id0SS2LIdsefsI6Uc/wO6qoJ Y5i28/qw86sV47dMOdccquOR9UVGWm4GfhrT3RdHBGlrBXGgWg2R/LTXuq18V6O06jL2 7PqtI35Lu7tMmSnMBsYsou+Qh6mUAEIgXeSRq6lxp8xZT1CBZzgpi5JUTCvESg6PwjeD 6tkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717694463; x=1718299263; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=EBzQ8negayjPzH4I927JPLD9bGZumwIM1r0NZmwJJnc=; b=W0UehYSuH4rRgKusi9fyGl8twdG1KLG/0mvCl8oxXME54ECirOEZ7ihi3kJWkh3RKH S0uAh20qQ7dMuJyQ8smDfufoIFV+cpJq7KEiVMhZhzVZ0N20t4Nx7obeNQspZuKv02pP 89GXyz91fLVN2FBI1AHxNx2v5wgIXP+omCJpuJ/DHkAlX3kO1cnUcsjyvEU2W3QOEifO 5ggX8Q2IqUArS+Goj4UtMzw0F8deUE+4K0/E4FCClm7g6sEwJhU74QfefUhFN3X+CqYg j9Wpwr63a3GWpU2Iu1oc0EgWfqPaMLuEFfCPT9oAhvEiC6kRF0gN97CYn4sSrFZ9MRnI K4ng== X-Forwarded-Encrypted: i=1; AJvYcCX5SFXU+YKwM6ShGf58w524PXa5+HWtrG4Z0PQMrYoJX+W4Do1c23zed9sGdKgYm5oG/n/Oy+CM3Vn+RyFtNgrQ/3dLLFTVutdJq13U4VBpOECCXaJIkddbXiVdMrXpDNdlWAi7cqGP+hOa X-Gm-Message-State: AOJu0Yw3KN6Mfu4MoudfyyuwGvBehzKZRKQTB4AUcWrA9Iy6WdKz/+Qt IMwChRG6YpjXBccDakt3TFgUsp9pD7jPCOeeTRY0lF5WWKcu6I6ODb4fBg== X-Received: by 2002:a2e:b711:0:b0:2ea:c00e:2a93 with SMTP id 38308e7fff4ca-2eadce715b2mr2147021fa.40.1717694462861; Thu, 06 Jun 2024 10:21:02 -0700 (PDT) Received: from alsp.netis.cc ([2a02:2168:8a08:3100:4883:2cdd:2b2a:fbd5]) by smtp.googlemail.com with ESMTPSA id 38308e7fff4ca-2ead41b078asm2613361fa.74.2024.06.06.10.21.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 10:21:02 -0700 (PDT) From: Alexander Sapozhnikov To: Herbert Xu , "David S. Miller" Cc: Alexandr Sapozhnikov , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: [PATCH] crypto: algif_aead: After having been compared to a NULL value at algif_aead.c:191, pointer 'tsgl_src' is passed as 2nd parameter in call to function 'crypto_aead_copy_sgl' at algif_aead.c:244, where it is dereferenced at algif_aead.c:85. Date: Thu, 6 Jun 2024 20:20:23 +0300 Message-Id: <20240606172023.23-1-alsp705@gmail.com> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Alexandr Sapozhnikov Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Alexandr Sapozhnikov --- crypto/algif_aead.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/algif_aead.c b/crypto/algif_aead.c index 42493b4..f757907 100644 --- a/crypto/algif_aead.c +++ b/crypto/algif_aead.c @@ -191,7 +191,7 @@ static int _aead_recvmsg(struct socket *sock, struct msghdr *msg, if (tsgl_src) break; } - if (processed && !tsgl_src) { + if (processed || !tsgl_src) { err = -EFAULT; goto free; } -- 2.5.3