Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp611582lqs; Tue, 5 Mar 2024 10:56:49 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWdUF20y3uiDhVQ9FXueubLipICJJ18R1X+Q6ybB3Kl9DGQ1tjNmlfkGTVteXvRNvZJx9Hu62xxexLLKwQro71EIfVHL/COt3Fn56YSfQ== X-Google-Smtp-Source: AGHT+IFUYOZXtf6m3rbUlCnT8Bq3V2DkZvy3TPJGMvEMd2i6GjSoPslprnptXdY2vxyV+LIDMgMA X-Received: by 2002:ad4:414e:0:b0:690:5fd5:37cb with SMTP id z14-20020ad4414e000000b006905fd537cbmr3021123qvp.28.1709665009408; Tue, 05 Mar 2024 10:56:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709665009; cv=pass; d=google.com; s=arc-20160816; b=QB4MLQPP+mDYqH0UaXzKWK/XQs/fYhcnJSvRbCem2DYzDNSe7dMIVsujAQ1V6wxoos OFc/mjVPRrtfxJbIZ+5zh54CKpM/Z0z64YxSc8Ad60FaUQv52+jlUhNfaXjdwf9ISX5f 6z+wF8Mip+81esgHx0qv8ZMXk4coduCojAjqvcoKedxTijavqffKt71p6szyaS0ayeFw /qG6buCKGyBT/D0bqjEZ8AKQ3utCOSPSIbxOaDIIzmDpNJM+rboNLQdYgt1HWToLHfZN ru6JNXxKP0lfzcWWL2D23sZNaerNmmU/UNVK0JCwvBOq0Rj6rDeAo9OdEDa2odMNYath tdjA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=date:message-id:user-agent:cc:to:references:in-reply-to:from :subject:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=0mzMu2pMzjrCgNUCCBy0mAOsvYEZi3zzR0HAU0TGCXg=; fh=QFh02TH+NeiDU910FreQqnmtAw5315t0KD+z0VLDPJE=; b=DPhN2cEf7bKZhhMuWXrr2PPt2a0SfAtq3+bPv6KqEo4mCv3OFhdBQYLLcDSZMmR+dS i+9PU7aiDiw2zpW889UjOoepu9ltdg9WOCUTaktSqLoT6iigFgbL5Cl1c/1gg0IiHgrh jDEJ2wwCjElW9s/CRPErOLxBTL/V5c6QqjDsxlarzvVoXDPgsV7h9nL/JSTZOPBp3ghL oknDwRCKUL/Uz0DGzre1hajZLj9j+5eNr2rdCgk2z7VkUtY8/E8r3wKJpj55xWVF0AtM qK2ytZ1nsS+zF1p9VDIYtq0rkAwe01aHsuF3He2id/mfQ+PNCz8w3ZGazCb57+5fOapz Jx1g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="CcB5d5/g"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-4398-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4398-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id kl13-20020a056214518d00b006903065874csi12678850qvb.199.2024.03.05.10.56.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 10:56:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-4398-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="CcB5d5/g"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-4398-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4398-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id E15DB1C226F3 for ; Tue, 5 Mar 2024 18:55:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 89F801B26E; Tue, 5 Mar 2024 18:55:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CcB5d5/g" X-Original-To: linux-wireless@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 64FB118EBB; Tue, 5 Mar 2024 18:55:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709664954; cv=none; b=uMg6OfRcYIQw3ygUNTD+u7N2L26n5q+uJbm/9JbYHxyQniMhxlX6dvCFd/Va/Jv5z4mPdN88EOfTAafV0lVqtEwoepKwStMo1xOx7jGuf9Ljivd0iwfrdmvCzfU//fzpvv6N8YWbUl3zmYca+vAy8MNG1058bk29C6mdW34Pe3w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709664954; c=relaxed/simple; bh=XbKyIseOs3O4QkGJj/50dL2guXVpKbgyIoIhG/Hnj94=; h=Content-Type:MIME-Version:Subject:From:In-Reply-To:References:To: Cc:Message-ID:Date; b=uFuLlvCDoiV579UNyNEbAkRqMv92QMFCGGo1u59AXaO1hkbEHJwnA+iE6VIXRucIwfUfOlvefw4sKro+nbJHeGybB/bueKvCdZhoK82sWa8TZXNY5zxW0p2iU4qrCXFuVdZYJRpUC6LUaJHrSJ7O9HUpwCKn2j9Z6grbG+iOHoc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CcB5d5/g; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3A119C433C7; Tue, 5 Mar 2024 18:55:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709664953; bh=XbKyIseOs3O4QkGJj/50dL2guXVpKbgyIoIhG/Hnj94=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=CcB5d5/gC/g7UDGwpgMmsWBxKTt393MQDmK+u2fOPmGvTSYmsvd9J5VcWSEf7Ep43 2ExA/MRqBN1q1sR8wTMH0PAIOVnd6yvGLcyY3QReg6O10jvB1gqItvtd1MzkIJPtKx rus55E01v5sT3ZMuYdBhC+QOvIKkftrtIw9Zlto69m0XSIXVqwmGk2Z4KaEucCPzJk 19IPcmjncZTJLj2Z003d2OMfw4l59oeaIcEKge5pKboGfWkC01J1p7IXbm5nLzIceU 6P7wHM2PF0VB/TgDbgSM7GWMGCmMjYteChBNC1M87VwfKlHESU0nzKqrYbrg3OgrlX WpytybP7fYk8w== Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH] ssb: Fix potential NULL pointer dereference in ssb_device_uevent From: Kalle Valo In-Reply-To: <20240229093756.129324-1-rand.sec96@gmail.com> References: <20240229093756.129324-1-rand.sec96@gmail.com> To: Rand Deeb Cc: Michael Buesch , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, deeb.rand@confident.ru, lvc-project@linuxtesting.org, voskresenski.stanislav@confident.ru, Rand Deeb User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.11.2 Message-ID: <170966495037.424347.1344425289163744212.kvalo@kernel.org> Date: Tue, 5 Mar 2024 18:55:52 +0000 (UTC) Rand Deeb wrote: > The ssb_device_uevent function first attempts to convert the 'dev' pointer > to 'struct ssb_device *'. However, it mistakenly dereferences 'dev' before > performing the NULL check, potentially leading to a NULL pointer > dereference if 'dev' is NULL. > > To fix this issue, this patch moves the NULL check before dereferencing the > 'dev' pointer, ensuring that the pointer is valid before attempting to use > it. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > Signed-off-by: Rand Deeb > Acked-by: Michael Büsch Failed to apply: error: sha1 information is lacking or useless (drivers/ssb/main.c). error: could not build fake ancestor hint: Use 'git am --show-current-patch=diff' to see the failed patch Applying: ssb: Fix potential NULL pointer dereference in ssb_device_uevent Patch failed at 0001 ssb: Fix potential NULL pointer dereference in ssb_device_uevent Patch set to Changes Requested. -- https://patchwork.kernel.org/project/linux-wireless/patch/20240229093756.129324-1-rand.sec96@gmail.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches