From: Johannes Berg <johannes@sipsolutions.net>
To: Nikolay Kuratov <kniv@yandex-team.ru>, linux-kernel@vger.kernel.org
Cc: linux-wireless@vger.kernel.org,
Stanislav Yakovlev <stas.yakovlev@gmail.com>,
Hong Liu <liu.hong@intel.com>,
James Ketrenos <jketreno@linux.intel.com>,
stable@vger.kernel.org
Subject: Re: [PATCH] wifi: ipw2x00: Fix potential NULL crypt->ops dereference in libipw_xmit()
Date: Wed, 27 May 2026 11:56:38 +0200 [thread overview]
Message-ID: <57001abe5cdd0f2a7fc533764f0d9140fe20a3ad.camel@sipsolutions.net> (raw)
In-Reply-To: <20260527090833.521511-1-kniv@yandex-team.ru>
On Wed, 2026-05-27 at 12:08 +0300, Nikolay Kuratov wrote:
> 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.
Might want to fix your tool to look deeper than just pattern-matching
the surrounding code :) The prior commit was also already wrong.
We already have
host_encrypt = ieee->host_encrypt && encrypt && crypt;
so "host_encrypt && crypt" is equivalent to checking just
"host_encrypt".
And the only way to set the crypt[] array where a non-NULL 'crypt' comes
from will always have ops, so "crypt && crypt->ops" is equivalent to
checking just "crypt".
johannes
next prev parent reply other threads:[~2026-05-27 9:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-27 9:08 Nikolay Kuratov
2026-05-27 9:56 ` Johannes Berg [this message]
2026-05-27 11:14 ` Nikolay Kuratov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57001abe5cdd0f2a7fc533764f0d9140fe20a3ad.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=jketreno@linux.intel.com \
--cc=kniv@yandex-team.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=liu.hong@intel.com \
--cc=stable@vger.kernel.org \
--cc=stas.yakovlev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®