From nobody Wed Feb 19 16:25:17 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YyhZP51QTz5pZ03; Wed, 19 Feb 2025 16:25:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YyhZP46mZz3bBD; Wed, 19 Feb 2025 16:25:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739982317; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HYZcPT0s+2/Q+2vWpnAHbwCzC68pRGD/tsE4QLy6ofw=; b=US0hjZkWTLY6rlxO02sqNdyL1KWRjzi8PfP2+L+1+EGoR+9K27EVouokY4cgDZlXippVXS /Vs/+AUxkTh3dZhkE0TSgXRXTqgW8ZSlkO1BJfqebS7NpZcSbnRP/p+PQ73ECGQJcM9mid H9+BfrqKACke8bYtCZxILQLyxJVPEYb8Up1WPqPLKngv9o2ow5m2tOJpykoVJCt6NcekxK 1TF+JlVDkxrTaoUo/F4uLeVRI1z3IS9RXMTiD6IiT/ZTeurwiNorMdOEttEa5B/NNWjZ3h K2T4dGi7ekBqznuYu4d7I2NhGuukwLpuSWfvdC5f5nXAEuSkZs4fulXPPk6tqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1739982317; a=rsa-sha256; cv=none; b=hEu60888rGeyaqb2a1xUgeCw7xmw9hWQtWSabmpMPARhrrPV6Fj8vSGUUvyPeoqiVGx8mP GF5+QC3LfWKBlYAqEn16TLLNS6JnmlIBzEHDruhaDFoaRtvx02+f8Xk5JdsEwSN/PPbQFx oZPEHdRQMDONfpD4WmziPoKECAhMWpvj8Nr4U5/9xDmNXbkEoINuAvTVcj75FTcjJGZ8m3 mkA5yVMd3Or3x1mdqmUjl27nuuj1WYd3Weeo7AXcU4DvlnYFik/PgPsgO+mfUmlvP3tc3/ 6+WPfTHqZo+/0G5tsw4LuNth5/KqOq3OfSxpSiGirenf56Y7zZavhb0Km6johw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739982317; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HYZcPT0s+2/Q+2vWpnAHbwCzC68pRGD/tsE4QLy6ofw=; b=o4acm0zLYYFzhwy9ZQveZrwOE9COlMEabRH/Fg+ITITDHv1m88kRz2Q323txacH68eig6j iUZDNEeDrM9BMWcAEOsy41H2fMog8WobclHZjI8UgDa1/lwuuUduJWAjfEpDp/85BsSajV tPCshiWoG6sgFOP3CNraSO3dvxc7yrdQdCAr52zmddmMvO9K8fibcMj3gvuWvgoDyBJZRO 2z4iJbAnmsbMzYHNHC3+PrJh/kOOZVGITnLiPU7i2vwFV3ttMUHCxveBnruiB599ckqll9 NkeQE/wsb2pXAwkpP/EmKfbblRr4vvBGrt0ULOVNmE+08YviKL/aipgihKdaMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YyhZP3jvgz1CQk; Wed, 19 Feb 2025 16:25:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 51JGPHsC083927; Wed, 19 Feb 2025 16:25:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 51JGPHd0083924; Wed, 19 Feb 2025 16:25:17 GMT (envelope-from git) Date: Wed, 19 Feb 2025 16:25:17 GMT Message-Id: <202502191625.51JGPHd0083924@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 2dcc11d82758 - stable/13 - uath: Avoid a NULL dereference List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2dcc11d82758b0b1320dbc16c8ce30b0f8d5b4c5 Auto-Submitted: auto-generated The branch stable/13 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=2dcc11d82758b0b1320dbc16c8ce30b0f8d5b4c5 commit 2dcc11d82758b0b1320dbc16c8ce30b0f8d5b4c5 Author: Jose Luis Duran AuthorDate: 2025-02-12 15:31:43 +0000 Commit: Jose Luis Duran CommitDate: 2025-02-19 16:23:59 +0000 uath: Avoid a NULL dereference PR: 284643 Reviewed by: adrian Approved by: emaste (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48948 (cherry picked from commit 4b77a9a80cf8a9cba5607d8d8fa0742334dcf0f4) --- sys/dev/usb/wlan/if_uath.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/dev/usb/wlan/if_uath.c b/sys/dev/usb/wlan/if_uath.c index 7d5e50590ea2..480e987a924d 100644 --- a/sys/dev/usb/wlan/if_uath.c +++ b/sys/dev/usb/wlan/if_uath.c @@ -2303,10 +2303,12 @@ uath_cmdeof(struct uath_softc *sc, struct uath_cmd *cmd) __func__, dlen, sizeof(uint32_t)); return; } - /* XXX have submitter do this */ - /* copy answer into caller's supplied buffer */ - bcopy(hdr+1, cmd->odata, sizeof(uint32_t)); - cmd->olen = sizeof(uint32_t); + if (cmd->odata != NULL) { + /* XXX have submitter do this */ + /* copy answer into caller's supplied buffer */ + bcopy(hdr+1, cmd->odata, sizeof(uint32_t)); + cmd->olen = sizeof(uint32_t); + } wakeup_one(cmd); /* wake up caller */ break;