diff options
| author | Yuqi Xu <xuyuqiabc@gmail.com> | 2026-09-19 16:48:12 +0800 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2026-09-21 16:30:25 +0200 |
| commit | 5bfd4b0b40b79781d900cb2f7da0685070f53c67 (patch) | |
| tree | 538a24d5a57ab91c4834e38846f83b5babdab23a /tools/perf/scripts/python | |
| parent | 15fb9e3cea55fbc378261ce35a32b0f8828f0000 (diff) | |
| download | linux-5bfd4b0b40b79781d900cb2f7da0685070f53c67.tar.gz linux-5bfd4b0b40b79781d900cb2f7da0685070f53c67.zip | |
wifi: mac80211: handle empty FILS association request payload
fils_encrypt_assoc_req() accepts a (Re)Association Request frame whose
last element is the FILS Session element. crypt_len is then zero and
aes_siv_encrypt() is called with an empty plaintext.
kmemdup() returns ZERO_SIZE_PTR for a zero-length allocation, so the
unconditional sg_init_one() puts an invalid page into the scatterlist.
With CONFIG_DEBUG_SG this triggers a kernel BUG in sg_set_buf();
without the debug check the bogus page is handed to the crypto backend.
AES-SIV is defined for empty plaintext and the S2V result is then the
complete output, so handle this case before the CTR step, which has
nothing to encrypt.
Fixes: 39404feee691 ("mac80211: FILS AEAD protection for station mode association frames")
Cc: stable@vger.kernel.org
Reported-by: Vega <vega@nebusec.ai>
Assisted-by: LLM
Signed-off-by: Yuqi Xu <xuyuqiabc@gmail.com>
Reviewed-by: Ren Wei <weir@nebusec.ai>
Link: https://patch.msgid.link/325c048982d637a3af80d74ac5b36e9369b93f1e.1789751126.git.xuyuqiabc@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
