Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp113964lqc; Thu, 7 Mar 2024 11:53:51 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXlVhjjymN/CtfjheHeUzfLQDvjI+Bf2sqL//HB8L+AnzpkAQlLWDoyxuvXqGxK+cvBdnKnTKgyC9uDTTiTdeoawED1HWIyN9Muedi4Vg== X-Google-Smtp-Source: AGHT+IEWPtqupVtUqEVKTNIu8TZCDqmxa1bn+/dustuHs6Q/IWVMN4crSkR97blqyrMxmRegcITY X-Received: by 2002:a05:6a00:2c90:b0:6e5:ce7e:929f with SMTP id ef16-20020a056a002c9000b006e5ce7e929fmr17068758pfb.7.1709841231311; Thu, 07 Mar 2024 11:53:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709841231; cv=pass; d=google.com; s=arc-20160816; b=w6BmhD5KhmNP3U1UMf89rLldeDkSNXcpopD6JdA85HK+kWnMGRXkecX285DUkqunPg 2RbCT+fWOGfFtxtuHtNTXHvV6DROygHJe0eGw432DljoV8gfOm9Rj7jcqa3/VJJQ+fp5 bG4oytQNoLFKbeJ4eOzTgninNermBaC2yrcTAHBl6gIvO+3u9NkOr4a/5F0FXzk41/Pk J882Rp5H4bR73ZXAJerX9jV20EyIZ00iG4s6OD/O9q2AXtnbFKEBWlixS81z5fzMDinC B0iSWY2fOcDIgzQPOy8K+96RHzG4we8a+2b7D8NFzjf7WWeTh9iHrKhSTFgkLpyu7LLx kDUA== 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=5PVily7FU6GJy5Nkk5KN77VrVoGkvWQzL6/vzQKnhzA=; fh=n4b/1lKurzlGBivOduWgrpCSXwc9hWLuIpERZUNLN+g=; b=ZDdjAP2RbzDWFODgY1SNbAhTMUK6VhlRTiL+jWF7xKhzsWzLFfAS3XjD/Lvfh3LSsJ 0yIaTWRV5ntTdeJmuVAfWWyPTqEa5c1/+J72OdYxmLvmy5sX9c59yj99tsEyngFaJNkQ qFc1nCCecAxpWnZ5Ylekbvw5D8BdDKk0vx1EEJ+2qIqOkR+IoGdaWQMcNJ1mZrUdzHhQ ly7RdTe9dGSU3YM1Buvq7NphhkA0T6XWAK14bUiHj4gdWM5DXzv+CAuI0GRRJ155VrXE iPh4AI5FIjIsyT+Q1MDSWRwne0EszjEwgzYBYNafhh6Iq87WfGgudRj7w2T2E+1AzXa5 kJ6g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=e28jsTOA; 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-96114-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96114-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id b27-20020aa78edb000000b006e66a4bd993si46625pfr.83.2024.03.07.11.53.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 11:53:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96114-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=@chromium.org header.s=google header.b=e28jsTOA; 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-96114-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96114-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 18F48287F78 for ; Thu, 7 Mar 2024 19:34:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3A755137C43; Thu, 7 Mar 2024 19:34:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="e28jsTOA" Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) (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 F33F91369BD for ; Thu, 7 Mar 2024 19:34:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709840064; cv=none; b=Eh643TezlkvCmJ7XnKY3LcnsHyWZIF4LyXCZZlcp0PiOvLXca5Uj1lgwJZXkNoKaF2iJJxpBOxF302P9TgL8IimaI67j+0hUwCGGVQGl91nMfcBkYmtidNUNq+s4GCVl+xyykzt7LLXw0TVMZlMbQAgTvW1CMvZJ4dHh5sjohMQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709840064; c=relaxed/simple; bh=Kfej+LHgbQK/sCIhdJwBilxV00+UrdCsx4d2kwtAhzI=; h=From:Date:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=LxdiWPqv1ZeZfAhu67ZMEPtqCcV3DJYLke3lIIxctq9HazlPaQip0lUv9UaN9wNgqUI6WQiz9fKiuz8wPe40uN+H49LVeApZCr9F0NK1C53WGcdHkalZ90mxAfA6vBSMvUILL1uHWh5y3oJkf6K6a0p+10qgeY64OCnzqGnqVnU= 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=e28jsTOA; arc=none smtp.client-ip=209.85.210.176 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-pf1-f176.google.com with SMTP id d2e1a72fcca58-6e649a2548cso52114b3a.3 for ; Thu, 07 Mar 2024 11:34:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1709840062; x=1710444862; 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=5PVily7FU6GJy5Nkk5KN77VrVoGkvWQzL6/vzQKnhzA=; b=e28jsTOA8z8eleeZBjLe98kX/vXrI3/BL2Ut+ZpkaOR3xT3cBjHFCGU92TIPdhqmlh p4I57xCdRxLYN6GKMQmw2KA6wc0SKSY7LFn6yF7Q+wfoDLFC2gKtYkTG1zXUeAah9FnP 2vuvLOQWh52Tw0fENyYyNnhf8gx18u+bqvU9M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709840062; x=1710444862; 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=5PVily7FU6GJy5Nkk5KN77VrVoGkvWQzL6/vzQKnhzA=; b=CIXE6tY7GRK4hEEy5rVWFhMdrAhkq0oWLwp95UQqLhwAYTO9kPkVPtY/eP1A9GhUSK C1OiJEhx9tqw6tDr7+cpQ0MkDu2agLs7CjNouePZ6iUzM7cPiETOIQTmlonpK4VvLCBC VAew05U3HCHkmrE8XUMkI+zFBrDkZIYpXV4bTYRJOuiRG39oC/Glx439qwKd9IGzfJga j4gsVKlL8GMnE+aoO+0h4XQQxtze1ABB3xdurMfkQIpl/o1WVUgQ9wnjfMmj0xUGvm21 kXIwtx3nwYgofFFr9UUQL2Wk/UekaYoR5gLUPa9C+IH985350Vkfb1R8pmWD3RbGV57M XAHA== X-Forwarded-Encrypted: i=1; AJvYcCXo0QPCO1mlpjddGKPry+8SUPlQau+sUYj52WxIrwuPl3YBKWZooxDjC3OmM4iwg3wQBoS6VorCJsyZMxfu0ZE31GorX124CE8O6ncB X-Gm-Message-State: AOJu0YymKUMZOxbzwwnKTYEy8H2gqsOOCD/XremUtxl1/eV+rSik2lEr 9MSZzypfz3YTBX5f0aUysxpIdoMKZah//k4bvgmU9xOUmEg9vjkbnlbUvCpCcw== X-Received: by 2002:a05:6a00:2b44:b0:6e6:2af9:7553 with SMTP id du4-20020a056a002b4400b006e62af97553mr10534245pfb.5.1709840062303; Thu, 07 Mar 2024 11:34:22 -0800 (PST) Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id p4-20020a056a0026c400b006e65255b9acsm2725907pfw.49.2024.03.07.11.34.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 11:34:21 -0800 (PST) From: coverity-bot X-Google-Original-From: coverity-bot Date: Thu, 7 Mar 2024 11:34:21 -0800 To: Jameson Thies Cc: Hans de Goede , Fabrice Gasnier , Neil Armstrong , linux-usb@vger.kernel.org, Benson Leung , Saranya Gopal , Dmitry Baryshkov , Abhishek Pandit-Subedi , Prashant Malani , Heikki Krogerus , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Gustavo A. R. Silva" , linux-next@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Coverity: ucsi_check_cable(): Null pointer dereferences Message-ID: <202403071134.7C7C077655@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: Tue Mar 5 13:11:08 2024 +0000 f896d5e8726c ("usb: typec: ucsi: Register SOP/SOP' Discover Identity Responses") Coverity reported the following: *** CID 1584245: Null pointer dereferences (FORWARD_NULL) drivers/usb/typec/ucsi/ucsi.c:1136 in ucsi_check_cable() 1130 } 1131 1132 ret = ucsi_register_cable(con); 1133 if (ret < 0) 1134 return ret; 1135 vvv CID 1584245: Null pointer dereferences (FORWARD_NULL) vvv Passing "con" to "ucsi_get_cable_identity", which dereferences null "con->cable". 1136 ret = ucsi_get_cable_identity(con); 1137 if (ret < 0) 1138 return ret; 1139 1140 ret = ucsi_register_plug(con); 1141 if (ret < 0) 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: 1584245 ("Null pointer dereferences") Fixes: f896d5e8726c ("usb: typec: ucsi: Register SOP/SOP' Discover Identity Responses") Thanks for your attention! -- Coverity-bot