From nobody Mon Jun 8 18:58:48 2026 Received: from forwardcorp1a.mail.yandex.net (forwardcorp1a.mail.yandex.net [178.154.239.72]) (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 8E1A63E277F; Wed, 27 May 2026 09:09:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.154.239.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779872963; cv=none; b=guXr2NAteV/oK9ten25+T8FMQrv/tRI+gHdxgGyRFpqZDgImfxAOtQJQgExXcZ8/hiGMO0Cjj1sTk+V54TNdt1XjV/mWtzDVFy4CDvk1eSVLraK5JEXjJ7bAl4hl5GmM4ll2kVo+gPVuVRT62TbpT2bx3mJQks//b5R861r0hW4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779872963; c=relaxed/simple; bh=vzoo95YI4OQsuRuaJuDJx427z+CcEVxZzy5X9IIKetA=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=GCIFU04bcwn3fbxRcdZQrIRRqWJ2jHrIpVwdb6Vs21nK2AfOEZOviIcn8VkjYm5HEGG4DYEt9+Mf1hhr2ItnQpmEcPIqOYr9LnVFAPAY3BY8tbJoWo3gdJCI2fvICgxgJe1nHGfkrjElmVCAfneDUJ/63ayl0+Gh16IN4Uu8zgI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=yandex-team.ru; spf=pass smtp.mailfrom=yandex-team.ru; dkim=pass (1024-bit key) header.d=yandex-team.ru header.i=@yandex-team.ru header.b=C7CYZWAF; arc=none smtp.client-ip=178.154.239.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=yandex-team.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=yandex-team.ru Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=yandex-team.ru header.i=@yandex-team.ru header.b="C7CYZWAF" Received: from mail-nwsmtp-smtp-corp-main-83.vla.yp-c.yandex.net (mail-nwsmtp-smtp-corp-main-83.vla.yp-c.yandex.net [IPv6:2a02:6b8:c2d:3530:0:640:eca4:0]) by forwardcorp1a.mail.yandex.net (Yandex) with ESMTPS id 6904DC01BE; Wed, 27 May 2026 12:09:13 +0300 (MSK) Received: from kniv-nix.yandex-team.ru (unknown [2a02:6bf:8080:1a::1:10]) by mail-nwsmtp-smtp-corp-main-83.vla.yp-c.yandex.net (smtpcorp) with ESMTPSA id X8VR7K0XJSw0-UAZ19Y9I; Wed, 27 May 2026 12:09:12 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1779872952; bh=bKNvoIKWs8rt1p1/xgViVNVlhP27k63LgvgrDzBDcnM=; h=Message-Id:Date:Cc:Subject:To:From; b=C7CYZWAFDWicK+2c0A86LuKVT76ZMwVpCZRxLIIrr94GBU5FO0KHWPgHP9DzVkQxF P0s86jTGkpqEvwVyd7m/Im/ADhTiwRQbjnFBluRUrSXfOD6f9/NcfdPwRZnncTRpxf qXdM46xEaTSKDWd4t1/1TOjqZYo4e5/9ABOG/fL0= Authentication-Results: mail-nwsmtp-smtp-corp-main-83.vla.yp-c.yandex.net; dkim=pass header.i=@yandex-team.ru From: Nikolay Kuratov To: linux-kernel@vger.kernel.org Cc: linux-wireless@vger.kernel.org, Stanislav Yakovlev , Hong Liu , James Ketrenos , Nikolay Kuratov , stable@vger.kernel.org Subject: [PATCH] wifi: ipw2x00: Fix potential NULL crypt->ops dereference in libipw_xmit() Date: Wed, 27 May 2026 12:08:33 +0300 Message-Id: <20260527090833.521511-1-kniv@yandex-team.ru> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" crypt and crypt->ops could be null, so we need to checking null before dereference Previously the commit e8366bbabe1d ("ipw2x00: Fix potential NULL dereference in libipw_xmit()") partially fixed that same issue in libipw_xmit(). This is similar to CVE-2022-49544. Found by Svace static analysis tool. Cc: stable@vger.kernel.org Fixes: 1264fc0498e1e ("[PATCH] ieee80211: Fix TKIP, repeated fragmentation = problem, and payload_size reporting") Signed-off-by: Nikolay Kuratov --- drivers/net/wireless/intel/ipw2x00/libipw_tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/ipw2x00/libipw_tx.c b/drivers/net/w= ireless/intel/ipw2x00/libipw_tx.c index 6e16060834b8..ec455e680030 100644 --- a/drivers/net/wireless/intel/ipw2x00/libipw_tx.c +++ b/drivers/net/wireless/intel/ipw2x00/libipw_tx.c @@ -450,7 +450,7 @@ netdev_tx_t libipw_xmit(struct sk_buff *skb, struct net= _device *dev) for (; i < nr_frags; i++) { skb_frag =3D txb->fragments[i]; =20 - if (host_encrypt) + if (host_encrypt && crypt && crypt->ops) skb_reserve(skb_frag, crypt->ops->extra_mpdu_prefix_len); =20 --=20 2.34.1