Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp105346lqc; Thu, 7 Mar 2024 11:35:08 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV0DoYM08HZDAbpd4I/GdC0dtbdgDSWp4/N6sQFgKir1isMLy3d4fpq6PI3VeW4ojYn/l5W34I1nS79fUFXQsKoRH3PDzmsl3GgC26NFA== X-Google-Smtp-Source: AGHT+IHQ+xDxJV8c1j9RMYz7Sk1OAE5lh+JrVRY0lOIxoJtEQVV3z7EJz7G3+DSCLGzYgz3wdP1z X-Received: by 2002:a05:6e02:1d15:b0:365:1d6b:7c67 with SMTP id i21-20020a056e021d1500b003651d6b7c67mr22082562ila.12.1709840108498; Thu, 07 Mar 2024 11:35:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709840108; cv=pass; d=google.com; s=arc-20160816; b=XP4qgkSCx5gcLn5glM3Wis2Gq8NEy8QFZFmqA1ONhe4zfckaqDV1FCCeHS81tBqxM0 hfC/ZDe/RjjWlzvt/axOEQGXtMY+dSnAxl2mzY+dt3XtMnlk3ucxVrLrp+TGA+fwe8G8 VQL5meER/fblM7GDOlzw/ZeRC3uQDTyioe9F9AfMaA1yqyQNAwKIooUzGei30TsqM4wg oGkQ6Zeyr5ysQNaQIVU9j+1pj6wbJ+8V8iKzE61A74QbKeqzGxbtZXV/lPIOojIsI1Vz T4UTgrRGK8Ggc3nEg5L4LiLMFeCf1d3+5qsqVAW1Y/V4UCMkgFsaLJEku+5yltJOtpxE XbIA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:date:from :dkim-signature; bh=N9qoSXzYZPN9ruMFhEGa01LS4BMnI7rAvWb4nFTzmXc=; fh=MTt13JAuT+U0EunAUkTSAtd+SljHOcFE0RGRC0lTrB8=; b=Z7rmS7abcqbrgRAr7YBe6b1hATt7yRgTcuBCxUsqYxROoJkxFhTWEBiUYBD+5HA+Rx L3zLx6lzcpcAfLYY0bpmPZmD5E8D/jY1H2HDBax3iTQyWp+FnSb464HINjx7l4blyOaM B1H9CXbzD2AWStOhmcoqARnUD3Lq7gicTUo4ExdlTR29UlVI4QFZvchTjQkIrK7U59nk cpD+C4s4KDYkslfa4sk5VHTutX+nVk2jHqPWcySmlr0Xx+ztoKRR6VyeMydhKIi4+F73 XPke3Cy7pU+q7qX1T6TR0j3CzKyZifYyu6osRWcLfGT+URK6PeRNUdoT5+hjSZMzcfE0 uFLw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=H35LTl9r; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-96112-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96112-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id c2-20020a631c42000000b005dc43133d78si14293363pgm.87.2024.03.07.11.35.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 11:35:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96112-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=H35LTl9r; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-96112-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96112-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id AE5CFB233EE for ; Thu, 7 Mar 2024 19:32:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EDA9B138485; Thu, 7 Mar 2024 19:32:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="H35LTl9r" Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) (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 78A83136997 for ; Thu, 7 Mar 2024 19:32:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709839948; cv=none; b=hLTtVMAPBSlKFVGIrDp4ePGoqqSmUc2hHDLcCcf8jWc72IawPHYcvIkPVcBbqOwTyeHm9SUSIsR8lSitTLFG6013MmbIok3cfYWgV1g6idE9/5WlYRmwT9dCTFMrRGiUoYPU1WDHzqnr7JLrHU+eL+Uar9Y5lK9ie22sc37CnAU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709839948; c=relaxed/simple; bh=7GcxakZLq2oKSdXj+ofXzEBmRC7bzIxUkfqgxs8FG00=; h=From:Date:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=EcHs/qPJ+2GL8geBCrseoJDc6EIcrKwjbHuNHZLZpiVW/9HBPP/ahznl9xG67lK6cCzWblBvIj8ix3/WVTIxNeEIGRRydKHoM3/aTxokdEfB4xMQ+c2pV4A7wIvHV6FRK1yj+h7nPbD6/fEAa9heJHkocp8aUGkMjHIRDpHNyfE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=H35LTl9r; arc=none smtp.client-ip=209.85.215.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pg1-f171.google.com with SMTP id 41be03b00d2f7-5d3907ff128so1027423a12.3 for ; Thu, 07 Mar 2024 11:32:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1709839946; x=1710444746; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:date:from :from:to:cc:subject:date:message-id:reply-to; bh=N9qoSXzYZPN9ruMFhEGa01LS4BMnI7rAvWb4nFTzmXc=; b=H35LTl9rrbmwdPzJ9BEr5gsW4yRvPb0B1ueFvVOAbbFCM1oOUGvMzXBIBjTaInzwOZ p1FgntUUc1QUgw45r9wD1UyX3tBagKyGJDc7/EqCUuAgNBWsLfkyFwlJiabT7weDLDb+ NjOG3U5WmJKpZcGN2Mft/gDtzpUx7IA18poQE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709839946; x=1710444746; h=content-disposition:mime-version:message-id:subject:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=N9qoSXzYZPN9ruMFhEGa01LS4BMnI7rAvWb4nFTzmXc=; b=ZrODtJ/YDY5sUyv8SxkUxPNlSA026iM5n3SYV+gMXV9ThXq7JLzIaDTNdWBpli8qVG dvL6rqU2U8J8EKzklwr3NdpNc1gqZMNwOWw/Eoj1gbIxoEcoUpgw+9iQbtiGX3wCWh3S bS9TuOBerQiNqp3vpkvE6ufzRw09cnwFxz/ycNBTLIjatN88Xrgcrwqc3r+VOLin0oXT UcdWf9hYo7sRnFQYiCjRvoE+1mnxT46OO/npFGi14UBuuLwLJ0mHbZI70XWJ2EcfZoue fUXWHiPTqU29q1MnLuOy0e8IGyI0E9eIbtZfssx5C+Ynj7Z7pcG/Y44M7aGsgZr1Sj0b /Izg== X-Forwarded-Encrypted: i=1; AJvYcCU1YiYAOxyMHGuYZ8F1F5j+ap5kG8NlffYsnIuDUFYEMXyIl12XBJgmAksCbVsAryncSL6E43FIWNyGW8XeQ9rJ1Ux3ra365tmo/IAi X-Gm-Message-State: AOJu0YxuDCXKZijM6A1Su0Wav+OV+9nPLBbPdDcO+Rro0S43vUfWLBqw /hpFGjmVS2xTa0G4fGUJNeqcfy4fTlG+PYNB7TVk+PkSwCUzn00pLqCDwuZnJg== X-Received: by 2002:a17:90b:24d:b0:29b:9c8f:5ea2 with SMTP id fz13-20020a17090b024d00b0029b9c8f5ea2mr1766760pjb.40.1709839945732; Thu, 07 Mar 2024 11:32:25 -0800 (PST) Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id h24-20020a17090adb9800b0029a849e7268sm1908119pjv.28.2024.03.07.11.32.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 11:32:25 -0800 (PST) From: coverity-bot X-Google-Original-From: coverity-bot Date: Thu, 7 Mar 2024 11:32:24 -0800 To: Edward Adam Davis Cc: linux-rdma@vger.kernel.org, Eric Dumazet , syzbot+d4faee732755bba9838e@syzkaller.appspotmail.com, "David S. Miller" , Allison Henderson , Jakub Kicinski , Paolo Abeni , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, rds-devel@oss.oracle.com, "Gustavo A. R. Silva" , linux-next@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Coverity: __rds_rdma_map(): Null pointer dereferences Message-ID: <202403071132.37BBF46E@keescook> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello! This is an experimental semi-automated report about issues detected by Coverity from a scan of next-20240307 as part of the linux-next scan project: https://scan.coverity.com/projects/linux-next-weekly-scan You're getting this email because you were associated with the identified lines of code (noted below) that were touched by commits: Wed Mar 6 11:58:42 2024 +0000 c055fc00c07b ("net/rds: fix WARNING in rds_conn_connect_if_down") Coverity reported the following: *** CID 1584247: Null pointer dereferences (FORWARD_NULL) net/rds/rdma.c:306 in __rds_rdma_map() 300 unpin_user_pages(pages, nr_pages); 301 kfree(sg); 302 } 303 ret = PTR_ERR(trans_private); 304 /* Trigger connection so that its ready for the next retry */ 305 if (ret == -ENODEV) vvv CID 1584247: Null pointer dereferences (FORWARD_NULL) vvv Dereferencing null pointer "cp". 306 rds_conn_connect_if_down(cp->cp_conn); 307 goto out; 308 } 309 310 mr->r_trans_private = trans_private; 311 If this is a false positive, please let us know so we can mark it as such, or teach the Coverity rules to be smarter. If not, please make sure fixes get into linux-next. :) For patches fixing this, please include these lines (but double-check the "Fixes" first): Reported-by: coverity-bot Addresses-Coverity-ID: 1584247 ("Null pointer dereferences") Fixes: c055fc00c07b ("net/rds: fix WARNING in rds_conn_connect_if_down") Thanks for your attention! -- Coverity-bot