Re: [PATCH AUTOSEL 6.18-6.12] wifi: cfg80211: reject duplicate wiphy cipher suite entries

From: Yuqi Xu

Date: Thu Sep 03 2026 - 04:44:59 EST


On Mon, Aug 31, 2026 at 09:26:35AM -0400, Sasha Levin wrote:
> [PATCH AUTOSEL 6.18-6.12] wifi: cfg80211: reject duplicate wiphy cipher suite entries

ACK for 6.18.y and 6.12.y.

I'm the author of the upstream commit. This AUTOSEL backport matches
7187d145d904, which has been in mainline since v7.2-rc1.

The change is a small wiphy_register() sanity check: reject duplicate
cipher suite entries, and reject n_cipher_suites > 0 with a NULL
cipher_suites pointer. Duplicate WEP entries can overflow the fixed
iw_range::encoding_size array in cfg80211_wext_giwrange(). In-tree
drivers already advertise unique cipher lists, so this should not
affect legitimate hardware.

Johannes preferred this over adding a bounds check in the WEXT compat
path, which is why the fix lives in core.c rather than wext-compat.c.

Acked-by: Yuqi Xu <xuyuqiabc@xxxxxxxxx>