| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/09/04 16:39 | flow | patch-triage |
2mArgs:null Results: {
"EnableConfigs": [
"CFG80211"
],
"FocusSymbols": [
"reg_check_chans_work",
"reg_leave_invalid_chans",
"reg_check_channels",
"nl80211_req_set_reg"
],
"KMSANReasoning": "The patch modifies the locking scheme and iteration over `cfg80211_rdev_list` in `reg_check_chans_work()`, replacing a global `rtnl_lock()` around the loop with fine-grained per-device `rtnl_lock()` / `rcu_read_lock()` toggling.\n\nThis change does not allocate any new memory buffers, does not copy kernel data to user space, and does not alter any initialization or reading of uninitialized fields. Any potential issues introduced by this patch relate strictly to concurrency, RCU lifetime rules, and locking (such as list traversal races or use-after-free if an element is deleted during the unlocked window), which are covered by KASAN and LOCKDEP. Therefore, dedicated KMSAN fuzzing is not needed.",
"NeedsKMSAN": false,
"Reasoning": "The patch modifies the locking and RCU traversal mechanism in `reg_check_chans_work()` in `net/wireless/reg.c`. Instead of holding RTNL throughout the iteration over `cfg80211_rdev_list`, it uses `list_for_each_entry_rcu()` and releases/re-acquires `rcu_read_lock()` across loop iterations to acquire RTNL per-device. Dropping `rcu_read_lock()` within an RCU list traversal introduces a potential use-after-free / dangling list pointer race condition if registered devices are removed during the iteration. The code is fully reachable via nl80211 regulatory netlink requests and virtual Wi-Fi devices (e.g., mac80211_hwsim), making it a prime candidate for syzkaller fuzzing.",
"WorthFuzzing": true
} |
| 1/1 | 2026/09/04 16:39 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit c9e52d74776e6e75d23855a51b76cf5f7a10813b\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Fri Sep 4 16:39:00 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/net/wireless/reg.c b/net/wireless/reg.c\nindex a8336baf85dc6..a2e0d1cf8317c 100644\n--- a/net/wireless/reg.c\n+++ b/net/wireless/reg.c\n@@ -2466,12 +2466,21 @@ static void reg_check_chans_work(struct work_struct *work)\n \tstruct cfg80211_registered_device *rdev;\n \n \tpr_debug(\"Verifying active interfaces after reg change\\n\");\n-\trtnl_lock();\n-\n-\tfor_each_rdev(rdev)\n+\t/*\n+\t * Acquire rtnl per-device instead of holding it for the entire loop;\n+\t * cfg80211_leave() can be slow and starve other rtnl waiters otherwise.\n+\t * wiphy_unregister() holds rtnl across list_del_rcu() + synchronize_rcu(),\n+\t * so rdev cannot be freed while we hold rtnl_lock() below.\n+\t */\n+\trcu_read_lock();\n+\tlist_for_each_entry_rcu(rdev, \u0026cfg80211_rdev_list, list) {\n+\t\trcu_read_unlock();\n+\t\trtnl_lock();\n \t\treg_leave_invalid_chans(\u0026rdev-\u003ewiphy);\n-\n-\trtnl_unlock();\n+\t\trtnl_unlock();\n+\t\trcu_read_lock();\n+\t}\n+\trcu_read_unlock();\n }\n \n void reg_check_channels(void)\n"
} |
| 2/1 | 2026/09/04 16:39 | agent | patch-evaluator |
1mModel:core Args: null Results: {
"EnableConfigs": [
"CFG80211"
],
"FocusSymbols": [
"reg_check_chans_work",
"reg_leave_invalid_chans",
"reg_check_channels",
"nl80211_req_set_reg"
],
"Reasoning": "The patch modifies the locking and RCU traversal mechanism in `reg_check_chans_work()` in `net/wireless/reg.c`. Instead of holding RTNL throughout the iteration over `cfg80211_rdev_list`, it uses `list_for_each_entry_rcu()` and releases/re-acquires `rcu_read_lock()` across loop iterations to acquire RTNL per-device. Dropping `rcu_read_lock()` within an RCU list traversal introduces a potential use-after-free / dangling list pointer race condition if registered devices are removed during the iteration. The code is fully reachable via nl80211 regulatory netlink requests and virtual Wi-Fi devices (e.g., mac80211_hwsim), making it a prime candidate for syzkaller fuzzing.",
"WorthFuzzing": true
}Instruction: You are an expert Linux kernel maintainer and security engineer.
Your job is to review a provided patch series and evaluate whether it warrants fuzzing with syzkaller.
IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in
your workspace. Do NOT rely on internal assumptions. You must actively use your code access
tools to inspect the actual source code, callers, and surrounding context.
================================================================================
1. CORE TRIAGE PHILOSOPHY
================================================================================
The goal of patch fuzzing is to discover crashes, regressions, exposed latent bugs,
and newly triggered assertions introduced by the patch series.
- REACHABILITY IS THE PRIMARY GATE:
Fuzzing can only discover bugs in code that can actually execute in standard virtualized
environments (GCE or QEMU, utilizing software-emulated devices like USB gadgets, netdev, tun/tap).
If the modified code is structurally unreachable (see Section 2), it MUST NOT be fuzzed,
regardless of whether it adds assertions or complex logic.
- DO NOT BLINDLY TRUST "NO FUNCTIONAL CHANGE" (NFCI) OR "REFACTORING" CLAIMS:
Patch authors routinely label changes as "cleanups", "refactorings", or state
"No functional change intended". Do NOT take these claims at face value.
Code refactorings that rearrange logic, introduce helper functions, or alter state management
in core subsystems frequently introduce subtle semantic shifts or uncover latent kernel bugs.
If reachable executable code is modified or refactored, it MUST be fuzzed.
- NEW OR MODIFIED ASSERTIONS IN REACHABLE CODE MUST BE FUZZED:
When a patch introduces or modifies runtime checks or assertions (e.g., WARN_ON*, VM_WARN_ON*,
BUG_ON*, lockdep_assert*) in reachable code paths, it enforces new or stricter invariants.
Even if the author believes the invariant always holds, fuzzing is essential to verify whether
an unusual sequence of operations can violate it.
================================================================================
2. WHEN TO RETURN WorthFuzzing=false (NEGATIVE CRITERIA)
================================================================================
Return WorthFuzzing=false ONLY IF all modified code falls strictly into one or more of these categories:
- Non-kernel and non-executable changes:
* Modifications to Documentation/, comments, or spelling fixes.
* User-space directories, self-tests, samples, or scripts (e.g., tools/, samples/, scripts/, usr/)
that do not affect the compiled kernel image (vmlinux) or kernel modules.
* Purely decorative logging (e.g., message strings in pr_err, printk, dev_info) or tracepoints
that do not alter control flow or data structures.
* Build system or Kconfig changes that do not alter compiled C logic.
- Structurally unreachable hardware:
* Vendor-specific PCIe switches, SmartNICs, or GPU drivers (e.g., mlxsw, pds_core, qed,
ionic, amdgpu) requiring physical ASIC/PCIe cards not emulated in standard QEMU.
- Unreachable execution paths:
* Driver teardown callbacks (.remove, .shutdown, pci_unregister_driver) executed only during
physical PCI hot-unplug or manual sysfs driver unbinding.
* Code paths exclusive to architectures other than the target architecture.
================================================================================
3. WHEN TO RETURN WorthFuzzing=true (POSITIVE CRITERIA)
================================================================================
Return WorthFuzzing=true whenever the patch touches reachable executable code, including:
- Core Subsystems:
* Any logic modifications in memory management (mm/), synchronization/locking (kernel/locking/),
BPF, scheduler, core networking, VFS, or syscall handling.
- Refactorings and Code Cleanups:
* Any restructuring of reachable data structures, helper abstractions, or algorithm flows.
- Runtime Assertions and Defensive Checks:
* Any introduction or alteration of assertions (WARN_ON*, VM_WARN_ON*, BUG_ON*, etc.) in reachable paths.
- Reachable Drivers and Protocols:
* Drivers accessible via virtual buses (virtio, USB gadget, loopback, netlink, binder, sockets, etc.).
================================================================================
4. EXTRACTING FocusSymbols (PREVENTING DILUTION)
================================================================================
When WorthFuzzing=true, you must extract specific kernel functions into FocusSymbols to guide the fuzzer:
- AVOID UBIQUITOUS LIFECYCLE HOT-PATHS:
Do NOT list generic, ubiquitous functions called by almost every program in the corpus
(including, but not limited to: general memory allocators and deallocators, page fault
and trap handlers, or core synchronization primitives; this is not an exhaustive list).
Listing ubiquitous functions causes the fuzzer to classify thousands of unrelated tests as "focused",
which severely dilutes fuzzing effort away from the actual changes.
- TARGET SPECIFIC FEATURE LOGIC AND ENTRYPOINTS:
List functions that specifically implement the logic being added or altered, or direct API entrypoints
for the subsystem feature under review.
- HANDLING STATIC INLINE FUNCTIONS IN HEADERS (.h):
Compiler-inlined static functions (such as static inlines in mm/*.h or include/linux/*.h) lack
distinct symbol addresses in vmlinux and cannot be targeted directly by symbol coverage filters.
If the changes are primarily in static inline helpers, identify non-static, feature-specific caller
functions in .c files that exercise them (avoiding ubiquitous lifecycle wrappers).
================================================================================
5. IDENTIFYING EnableConfigs
================================================================================
Identify any specific CONFIG_ options required to properly compile and reach the modified code:
- Inspect Kconfig files and #ifdef guards; do not make assumptions.
- Check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed.
- Strip any 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4").
Prefer calling several tools at the same time to save round-trips.
Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.
Prompt: Target architecture: amd64
For your convenience, here is the diff of the changes:
commit c9e52d74776e6e75d23855a51b76cf5f7a10813b
Author: syz-cluster <triage@syzkaller.com>
Date: Fri Sep 4 16:39:00 2026 +0000
syz-cluster: applied patch under review
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index a8336baf85dc6..a2e0d1cf8317c 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -2466,12 +2466,21 @@ static void reg_check_chans_work(struct work_struct *work)
struct cfg80211_registered_device *rdev;
pr_debug("Verifying active interfaces after reg change\n");
- rtnl_lock();
-
- for_each_rdev(rdev)
+ /*
+ * Acquire rtnl per-device instead of holding it for the entire loop;
+ * cfg80211_leave() can be slow and starve other rtnl waiters otherwise.
+ * wiphy_unregister() holds rtnl across list_del_rcu() + synchronize_rcu(),
+ * so rdev cannot be freed while we hold rtnl_lock() below.
+ */
+ rcu_read_lock();
+ list_for_each_entry_rcu(rdev, &cfg80211_rdev_list, list) {
+ rcu_read_unlock();
+ rtnl_lock();
reg_leave_invalid_chans(&rdev->wiphy);
-
- rtnl_unlock();
+ rtnl_unlock();
+ rcu_read_lock();
+ }
+ rcu_read_unlock();
}
void reg_check_channels(void)
|
| 3/2 | 2026/09/04 16:39 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 3069 output: 36 thoughts: 81 Thoughts: **Analyzing the Regulatory Domain Change** Okay, so this patch is digging into `net/wireless/reg.c`, specifically the `reg_check_chans_work` function. That immediately tells me this is about regulatory domain handling within the wireless stack – a critical area for ensuring compliance and avoiding interference. I need to get a handle on what's changing, and quickly. First, I'm going to pull up `net/wireless/reg.c` itself. I need the full context – the surrounding code, the data structures it interacts with, and how it fits into the broader wireless regulatory framework. Understanding the reachability of `reg_check_chans_work` is paramount; who calls it, what triggers it? And what are the key configurations that impact this function's behavior? I'll be looking for any related symbols, too. I'll probably use `grepper` or `read-file` to get the context I need. This will allow me to look at the surrounding code. |
| 4/2 | 2026/09/04 16:39 | tool | read-file |
0mArgs:{
"File": "net/wireless/reg.c",
"FirstLine": 2460,
"LineCount": 40
}Results: {
"Contents": "2460:\t\t\t\tcfg80211_leave(rdev, wdev, -1);\n2461:\t\t}\n2462:\t}\n2463:\t\n2464:\tstatic void reg_check_chans_work(struct work_struct *work)\n2465:\t{\n2466:\t\tstruct cfg80211_registered_device *rdev;\n2467:\t\n2468:\t\tpr_debug(\"Verifying active interfaces after reg change\\n\");\n2469:\t\t/*\n2470:\t\t * Acquire rtnl per-device instead of holding it for the entire loop;\n2471:\t\t * cfg80211_leave() can be slow and starve other rtnl waiters otherwise.\n2472:\t\t * wiphy_unregister() holds rtnl across list_del_rcu() + synchronize_rcu(),\n2473:\t\t * so rdev cannot be freed while we hold rtnl_lock() below.\n2474:\t\t */\n2475:\t\trcu_read_lock();\n2476:\t\tlist_for_each_entry_rcu(rdev, \u0026cfg80211_rdev_list, list) {\n2477:\t\t\trcu_read_unlock();\n2478:\t\t\trtnl_lock();\n2479:\t\t\treg_leave_invalid_chans(\u0026rdev-\u003ewiphy);\n2480:\t\t\trtnl_unlock();\n2481:\t\t\trcu_read_lock();\n2482:\t\t}\n2483:\t\trcu_read_unlock();\n2484:\t}\n2485:\t\n2486:\tvoid reg_check_channels(void)\n2487:\t{\n2488:\t\t/*\n2489:\t\t * Give usermode a chance to do something nicer (move to another\n2490:\t\t * channel, orderly disconnection), before forcing a disconnection.\n2491:\t\t */\n2492:\t\tmod_delayed_work(system_power_efficient_wq,\n2493:\t\t\t\t \u0026reg_check_chans,\n2494:\t\t\t\t msecs_to_jiffies(REG_ENFORCE_GRACE_MS));\n2495:\t}\n2496:\t\n2497:\tstatic void wiphy_update_regulatory(struct wiphy *wiphy,\n2498:\t\t\t\t\t enum nl80211_reg_initiator initiator)\n2499:\t{\n"
} |
| 5/2 | 2026/09/04 16:39 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 4038 output: 31 thoughts: 390 Thoughts: **My Analysis of a Potential RCU Issue** Okay, here's what's running through my mind. I'm looking at this code and immediately something jumps out: the use of `list_for_each_entry_rcu(rdev, &cfg80211_rdev_list, list)`. The *problem* is that the way this loop is structured, specifically the idea that it might drop the `rcu_read_lock` *inside* the loop. That's a huge red flag! My immediate thought is, if it's dropping the lock mid-iteration, there's a good chance `rdev->list.next` could become invalid. I'm remembering that `list_for_each_entry_rcu` *demands* that you hold `rcu_read_lock` continuously to ensure consistency. If `rcu_read_unlock()` is called and then we reacquire `rcu_read_lock()` within the loop, the list structure could be modified by another thread. Specifically, `rdev->list.next` used in the *next* iteration of the loop could point to freed or a modified memory location, if another `rdev` has been deleted or the list is re-ordered while the RCU lock is dropped. Wait, let me go a little deeper: actually the expansion of `list_for_each_entry_rcu` is `for (pos = ...; ...; pos = list_next_rcu(...))`. So, when the code executes `rcu_read_unlock()` followed by `rtnl_lock()` and then `rcu_read_lock()`, that means *rdev* might not be valid on the next loop iteration! This could be a race condition. And, of course, I'm thinking about the implications for net/wireless and cfg80211. This is a very well-fuzzed target in syzkaller. I know from experience that cfg80211, nl80211, and mac80211_hwsim are common targets, using virtual wifi devices. I bet the nl80211 regulatory domain changes (NL80211_CMD_REQ_SET_REG / NL80211_CMD_SET_REG) trigger checks, which is going to be calling `reg_check_channels()`. Okay, I'm going to quickly check Kconfig for `net/wireless/reg.c` and `mac80211/cfg80211` to make sure there are no obvious configuration issues there. |
| 6/2 | 2026/09/04 16:39 | tool | grepper |
0mArgs:{
"Expression": "CFG80211",
"PathPrefix": "net/wireless/"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 857 lines.\nUse more precise expression if possible.\n\nnet/wireless/Kconfig=5=config WEXT_CORE\nnet/wireless/Kconfig-6-\tdef_bool y\nnet/wireless/Kconfig:7:\tdepends on CFG80211_WEXT || WIRELESS_EXT\nnet/wireless/Kconfig-8-\n--\nnet/wireless/Kconfig=14=config WEXT_PRIV\n--\nnet/wireless/Kconfig-16-\nnet/wireless/Kconfig:17:config CFG80211\nnet/wireless/Kconfig-18-\ttristate \"cfg80211 - wireless configuration API\"\n--\nnet/wireless/Kconfig-24-\t# (this is here rather than below to allow it to be a module)\nnet/wireless/Kconfig:25:\tselect CRYPTO_SHA256 if CFG80211_USE_KERNEL_REGDB_KEYS\nnet/wireless/Kconfig-26-\thelp\n--\nnet/wireless/Kconfig-35-\nnet/wireless/Kconfig:36:if CFG80211\nnet/wireless/Kconfig-37-\nnet/wireless/Kconfig=38=config NL80211_TESTMODE\n--\nnet/wireless/Kconfig-51-\nnet/wireless/Kconfig:52:config CFG80211_DEVELOPER_WARNINGS\nnet/wireless/Kconfig-53-\tbool \"enable developer warnings\"\n--\nnet/wireless/Kconfig-67-\nnet/wireless/Kconfig:68:config CFG80211_CERTIFICATION_ONUS\nnet/wireless/Kconfig-69-\tbool \"cfg80211 certification onus\"\n--\nnet/wireless/Kconfig-88-\nnet/wireless/Kconfig:89:config CFG80211_REQUIRE_SIGNED_REGDB\nnet/wireless/Kconfig:90:\tbool \"require regdb signature\" if CFG80211_CERTIFICATION_ONUS\nnet/wireless/Kconfig-91-\tdefault y\n--\nnet/wireless/Kconfig-98-\nnet/wireless/Kconfig:99:config CFG80211_USE_KERNEL_REGDB_KEYS\nnet/wireless/Kconfig:100:\tbool \"allow regdb keys shipped with the kernel\" if CFG80211_CERTIFICATION_ONUS\nnet/wireless/Kconfig-101-\tdefault y\nnet/wireless/Kconfig:102:\tdepends on CFG80211_REQUIRE_SIGNED_REGDB\nnet/wireless/Kconfig-103-\thelp\n--\nnet/wireless/Kconfig-110-\nnet/wireless/Kconfig:111:config CFG80211_EXTRA_REGDB_KEYDIR\nnet/wireless/Kconfig:112:\tstring \"additional regdb key directory\" if CFG80211_CERTIFICATION_ONUS\nnet/wireless/Kconfig:113:\tdepends on CFG80211_REQUIRE_SIGNED_REGDB\nnet/wireless/Kconfig-114-\thelp\n--\nnet/wireless/Kconfig-121-\nnet/wireless/Kconfig:122:config CFG80211_REG_CELLULAR_HINTS\nnet/wireless/Kconfig-123-\tbool \"cfg80211 regulatory support for cellular base station hints\"\nnet/wireless/Kconfig:124:\tdepends on CFG80211_CERTIFICATION_ONUS\nnet/wireless/Kconfig-125-\thelp\n--\nnet/wireless/Kconfig-134-\nnet/wireless/Kconfig:135:config CFG80211_REG_RELAX_NO_IR\nnet/wireless/Kconfig-136-\tbool \"cfg80211 support for NO_IR relaxation\"\nnet/wireless/Kconfig:137:\tdepends on CFG80211_CERTIFICATION_ONUS\nnet/wireless/Kconfig-138-\thelp\n--\nnet/wireless/Kconfig-158-\nnet/wireless/Kconfig:159:config CFG80211_DEFAULT_PS\nnet/wireless/Kconfig-160-\tbool \"enable powersave by default\"\n--\nnet/wireless/Kconfig-168-\nnet/wireless/Kconfig:169:config CFG80211_DEBUGFS\nnet/wireless/Kconfig-170-\tbool \"cfg80211 DebugFS entries\"\n--\nnet/wireless/Kconfig-176-\nnet/wireless/Kconfig:177:config CFG80211_CRDA_SUPPORT\nnet/wireless/Kconfig-178-\tbool \"support CRDA\" if EXPERT\n--\nnet/wireless/Kconfig-186-\nnet/wireless/Kconfig:187:config CFG80211_WEXT\nnet/wireless/Kconfig-188-\tbool \"cfg80211 wireless extensions compatibility\"\n--\nnet/wireless/Kconfig-193-\nnet/wireless/Kconfig:194:config CFG80211_KUNIT_TEST\nnet/wireless/Kconfig-195-\ttristate \"KUnit tests for cfg80211\" if !KUNIT_ALL_TESTS\nnet/wireless/Kconfig-196-\tdepends on KUNIT\nnet/wireless/Kconfig:197:\tdepends on CFG80211\nnet/wireless/Kconfig-198-\tdefault KUNIT_ALL_TESTS\n--\nnet/wireless/Kconfig-203-\nnet/wireless/Kconfig:204:endif # CFG80211\n--\nnet/wireless/Makefile-1-# SPDX-License-Identifier: GPL-2.0\nnet/wireless/Makefile:2:obj-$(CONFIG_CFG80211) += cfg80211.o\nnet/wireless/Makefile-3-obj-y += tests/\n--\nnet/wireless/Makefile=12=cfg80211-$(CONFIG_OF) += of.o\nnet/wireless/Makefile:13:cfg80211-$(CONFIG_CFG80211_DEBUGFS) += debugfs.o\nnet/wireless/Makefile:14:cfg80211-$(CONFIG_CFG80211_WEXT) += wext-compat.o wext-sme.o\nnet/wireless/Makefile-15-\nnet/wireless/Makefile=16=CFLAGS_trace.o := -I$(src)\nnet/wireless/Makefile-17-\nnet/wireless/Makefile:18:cfg80211-$(CONFIG_CFG80211_USE_KERNEL_REGDB_KEYS) += shipped-certs.o\nnet/wireless/Makefile:19:ifneq ($(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR),)\nnet/wireless/Makefile-20-cfg80211-y += extra-certs.o\n--\nnet/wireless/Makefile=23=$(obj)/shipped-certs.c: $(sort $(wildcard $(src)/certs/*.hex))\n--\nnet/wireless/Makefile-31-\nnet/wireless/Makefile:32:$(obj)/extra-certs.c: $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR) \\\nnet/wireless/Makefile:33:\t\t $(sort $(wildcard $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR)/*.x509))\nnet/wireless/Makefile-34-\t@$(kecho) \" GEN $@\"\n--\nnet/wireless/chan.c=123=static const u16 puncturing_values_320mhz[] = {\n--\nnet/wireless/chan.c-128-\nnet/wireless/chan.c:129:#define CFG80211_PER_BW_VALID_PUNCTURING_VALUES(_bw) \\\nnet/wireless/chan.c-130-\t{ \\\n--\nnet/wireless/chan.c=135=static const struct cfg80211_per_bw_puncturing_values per_bw_puncturing[] = {\nnet/wireless/chan.c:136:\tCFG80211_PER_BW_VALID_PUNCTURING_VALUES(80),\nnet/wireless/chan.c:137:\tCFG80211_PER_BW_VALID_PUNCTURING_VALUES(160),\nnet/wireless/chan.c:138:\tCFG80211_PER_BW_VALID_PUNCTURING_VALUES(320)\nnet/wireless/chan.c-139-};\n--\nnet/wireless/chan.c=1695=static bool cfg80211_ir_permissive_chan(struct wiphy *wiphy,\n--\nnet/wireless/chan.c-1703-\nnet/wireless/chan.c:1704:\tif (!IS_ENABLED(CONFIG_CFG80211_REG_RELAX_NO_IR) ||\nnet/wireless/chan.c-1705-\t !(wiphy-\u003eregulatory_flags \u0026 REGULATORY_ENABLE_RELAX_NO_IR))\n--\nnet/wireless/core.c=549=struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,\n--\nnet/wireless/core.c-636-\t\t\t cfg80211_dfs_channels_update_work);\nnet/wireless/core.c:637:#ifdef CONFIG_CFG80211_WEXT\nnet/wireless/core.c-638-\trdev-\u003ewiphy.wext = \u0026cfg80211_wext_handler;\n--\nnet/wireless/core.c-658-\nnet/wireless/core.c:659:#ifdef CONFIG_CFG80211_DEFAULT_PS\nnet/wireless/core.c-660-\trdev-\u003ewiphy.flags |= WIPHY_FLAG_PS_ON_BY_DEFAULT;\n--\nnet/wireless/core.c=853=int wiphy_register(struct wiphy *wiphy)\n--\nnet/wireless/core.c-1122-\telse if (wiphy-\u003emax_num_akm_suites \u003c NL80211_MAX_NR_AKM_SUITES ||\nnet/wireless/core.c:1123:\t\t wiphy-\u003emax_num_akm_suites \u003e CFG80211_MAX_NUM_AKM_SUITES)\nnet/wireless/core.c-1124-\t\treturn -EINVAL;\n--\nnet/wireless/core.c=1408=static void _cfg80211_unregister_wdev(struct wireless_dev *wdev,\n--\nnet/wireless/core.c-1448-\nnet/wireless/core.c:1449:#ifdef CONFIG_CFG80211_WEXT\nnet/wireless/core.c-1450-\tkfree_sensitive(wdev-\u003ewext.keys);\n--\nnet/wireless/core.c=1503=void cfg80211_leave_locked(struct cfg80211_registered_device *rdev,\n--\nnet/wireless/core.c-1527-\nnet/wireless/core.c:1528:#ifdef CONFIG_CFG80211_WEXT\nnet/wireless/core.c-1529-\t\tkfree(wdev-\u003ewext.ie);\n--\nnet/wireless/core.c=1614=void cfg80211_init_wdev(struct wireless_dev *wdev)\n--\nnet/wireless/core.c-1622-\nnet/wireless/core.c:1623:#ifdef CONFIG_CFG80211_WEXT\nnet/wireless/core.c-1624-\twdev-\u003ewext.default_key = -1;\n--\nnet/wireless/core.c=1707=static int cfg80211_netdev_notifier_call(struct notifier_block *nb,\n--\nnet/wireless/core.c-1781-\t\tswitch (wdev-\u003eiftype) {\nnet/wireless/core.c:1782:#ifdef CONFIG_CFG80211_WEXT\nnet/wireless/core.c-1783-\t\tcase NL80211_IFTYPE_ADHOC:\n--\nnet/wireless/core.h=574=cfg80211_get_6ghz_power_type(const u8 *elems, size_t elems_len,\n--\nnet/wireless/core.h-576-\nnet/wireless/core.h:577:#ifdef CONFIG_CFG80211_DEVELOPER_WARNINGS\nnet/wireless/core.h:578:#define CFG80211_DEV_WARN_ON(cond)\tWARN_ON(cond)\nnet/wireless/core.h-579-#else\n--\nnet/wireless/core.h-584- */\nnet/wireless/core.h:585:#define CFG80211_DEV_WARN_ON(cond)\t({bool __r = (cond); __r; })\nnet/wireless/core.h-586-#endif\n--\nnet/wireless/core.h=624=struct cfg80211_colocated_ap {\n--\nnet/wireless/core.h-640-\nnet/wireless/core.h:641:#if IS_ENABLED(CONFIG_CFG80211_KUNIT_TEST)\nnet/wireless/core.h:642:#define EXPORT_SYMBOL_IF_CFG80211_KUNIT(sym) EXPORT_SYMBOL_IF_KUNIT(sym)\nnet/wireless/core.h:643:#define VISIBLE_IF_CFG80211_KUNIT\nnet/wireless/core.h-644-void cfg80211_free_coloc_ap_list(struct list_head *coloc_ap_list);\n--\nnet/wireless/core.h=649=size_t cfg80211_gen_new_ie(const u8 *ie, size_t ielen,\n--\nnet/wireless/core.h-652-#else\nnet/wireless/core.h:653:#define EXPORT_SYMBOL_IF_CFG80211_KUNIT(sym)\nnet/wireless/core.h:654:#define VISIBLE_IF_CFG80211_KUNIT static\nnet/wireless/core.h:655:#endif /* IS_ENABLED(CONFIG_CFG80211_KUNIT_TEST) */\nnet/wireless/core.h-656-\n--\nnet/wireless/debugfs.h-1-/* SPDX-License-Identifier: GPL-2.0 */\nnet/wireless/debugfs.h:2:#ifndef __CFG80211_DEBUGFS_H\nnet/wireless/debugfs.h:3:#define __CFG80211_DEBUGFS_H\nnet/wireless/debugfs.h-4-\nnet/wireless/debugfs.h:5:#ifdef CONFIG_CFG80211_DEBUGFS\nnet/wireless/debugfs.h-6-void cfg80211_debugfs_rdev_add(struct cfg80211_registered_device *rdev);\n--\nnet/wireless/debugfs.h=9=void cfg80211_debugfs_rdev_add(struct cfg80211_registered_device *rdev) {}\n--\nnet/wireless/debugfs.h-11-\nnet/wireless/debugfs.h:12:#endif /* __CFG80211_DEBUGFS_H */\n--\nnet/wireless/ibss.c=19=void __cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid,\n--\nnet/wireless/ibss.c-23-\tstruct cfg80211_bss *bss;\nnet/wireless/ibss.c:24:#ifdef CONFIG_CFG80211_WEXT\nnet/wireless/ibss.c-25-\tunion iwreq_data wrqu;\n--\nnet/wireless/ibss.c-51-\t\t\t\tGFP_KERNEL);\nnet/wireless/ibss.c:52:#ifdef CONFIG_CFG80211_WEXT\nnet/wireless/ibss.c-53-\tmemset(\u0026wrqu, 0, sizeof(wrqu));\n--\nnet/wireless/ibss.c=87=int __cfg80211_join_ibss(struct cfg80211_registered_device *rdev,\n--\nnet/wireless/ibss.c-140-\nnet/wireless/ibss.c:141:#ifdef CONFIG_CFG80211_WEXT\nnet/wireless/ibss.c-142-\twdev-\u003ewext.ibss.chandef = params-\u003echandef;\n--\nnet/wireless/ibss.c=156=void cfg80211_clear_ibss(struct net_device *dev, bool nowext)\n--\nnet/wireless/ibss.c-184-\tmemset(\u0026wdev-\u003eu.ibss.chandef, 0, sizeof(wdev-\u003eu.ibss.chandef));\nnet/wireless/ibss.c:185:#ifdef CONFIG_CFG80211_WEXT\nnet/wireless/ibss.c-186-\tif (!nowext)\n--\nnet/wireless/ibss.c=192=int cfg80211_leave_ibss(struct cfg80211_registered_device *rdev,\n--\nnet/wireless/ibss.c-213-\nnet/wireless/ibss.c:214:#ifdef CONFIG_CFG80211_WEXT\nnet/wireless/ibss.c-215-int cfg80211_ibss_wext_join(struct cfg80211_registered_device *rdev,\n--\nnet/wireless/mlme.c=277=void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr,\n--\nnet/wireless/mlme.c-282-\tstruct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);\nnet/wireless/mlme.c:283:#ifdef CONFIG_CFG80211_WEXT\nnet/wireless/mlme.c-284-\tunion iwreq_data wrqu;\n--\nnet/wireless/nl80211.c=666=nl80211_nan_peer_map_policy[NL80211_NAN_PEER_MAP_ATTR_MAX + 1] = {\n--\nnet/wireless/nl80211.c-668-\t[NL80211_NAN_PEER_MAP_ATTR_TIME_SLOTS] =\nnet/wireless/nl80211.c:669:\t\tNLA_POLICY_EXACT_LEN(CFG80211_NAN_SCHED_NUM_TIME_SLOTS),\nnet/wireless/nl80211.c-670-};\n--\nnet/wireless/nl80211.c=700=static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {\n--\nnet/wireless/nl80211.c-1082-\t[NL80211_ATTR_NAN_TIME_SLOTS] =\nnet/wireless/nl80211.c:1083:\t\tNLA_POLICY_EXACT_LEN(CFG80211_NAN_SCHED_NUM_TIME_SLOTS),\nnet/wireless/nl80211.c-1084-\t[NL80211_ATTR_NAN_AVAIL_BLOB] =\n--\nnet/wireless/nl80211.c=5466=static int nl80211_set_key(struct sk_buff *skb, struct genl_info *info)\n--\nnet/wireless/nl80211.c-5508-\nnet/wireless/nl80211.c:5509:#ifdef CONFIG_CFG80211_WEXT\nnet/wireless/nl80211.c-5510-\t\twdev-\u003ewext.default_key = key.idx;\n--\nnet/wireless/nl80211.c-5531-\nnet/wireless/nl80211.c:5532:#ifdef CONFIG_CFG80211_WEXT\nnet/wireless/nl80211.c-5533-\t\twdev-\u003ewext.default_mgmt_key = key.idx;\n--\nnet/wireless/nl80211.c=5644=static int nl80211_del_key(struct sk_buff *skb, struct genl_info *info)\n--\nnet/wireless/nl80211.c-5690-\nnet/wireless/nl80211.c:5691:#ifdef CONFIG_CFG80211_WEXT\nnet/wireless/nl80211.c-5692-\tif (!err) {\n--\nnet/wireless/nl80211.c=7867=static int nl80211_fill_link_station(struct sk_buff *msg,\n--\nnet/wireless/nl80211.c-7914-\tswitch (rdev-\u003ewiphy.signal_type) {\nnet/wireless/nl80211.c:7915:\tcase CFG80211_SIGNAL_TYPE_MBM:\nnet/wireless/nl80211.c-7916-\t\tPUT_LINK_SINFO(SIGNAL, signal, u8);\n--\nnet/wireless/nl80211.c=8045=static int nl80211_put_sta_info_common(struct sk_buff *msg,\n--\nnet/wireless/nl80211.c-8094-\tswitch (rdev-\u003ewiphy.signal_type) {\nnet/wireless/nl80211.c:8095:\tcase CFG80211_SIGNAL_TYPE_MBM:\nnet/wireless/nl80211.c-8096-\t\tPUT_SINFO(SIGNAL, signal, u8);\n--\nnet/wireless/nl80211.c=8790=int cfg80211_check_station_change(struct wiphy *wiphy,\n--\nnet/wireless/nl80211.c-8794-\tif (params-\u003elisten_interval != -1 \u0026\u0026\nnet/wireless/nl80211.c:8795:\t statype != CFG80211_STA_AP_CLIENT_UNASSOC)\nnet/wireless/nl80211.c-8796-\t\treturn -EINVAL;\n--\nnet/wireless/nl80211.c-8798-\tif (params-\u003esupport_p2p_ps != -1 \u0026\u0026\nnet/wireless/nl80211.c:8799:\t statype != CFG80211_STA_AP_CLIENT_UNASSOC)\nnet/wireless/nl80211.c-8800-\t\treturn -EINVAL;\n--\nnet/wireless/nl80211.c-8803-\t !(params-\u003esta_flags_set \u0026 BIT(NL80211_STA_FLAG_TDLS_PEER)) \u0026\u0026\nnet/wireless/nl80211.c:8804:\t statype != CFG80211_STA_AP_CLIENT_UNASSOC)\nnet/wireless/nl80211.c-8805-\t\treturn -EINVAL;\n--\nnet/wireless/nl80211.c-8810-\tswitch (statype) {\nnet/wireless/nl80211.c:8811:\tcase CFG80211_STA_MESH_PEER_KERNEL:\nnet/wireless/nl80211.c:8812:\tcase CFG80211_STA_MESH_PEER_USER:\nnet/wireless/nl80211.c-8813-\t\t/*\n--\nnet/wireless/nl80211.c-8823-\t\tbreak;\nnet/wireless/nl80211.c:8824:\tcase CFG80211_STA_TDLS_PEER_SETUP:\nnet/wireless/nl80211.c:8825:\tcase CFG80211_STA_TDLS_PEER_ACTIVE:\nnet/wireless/nl80211.c-8826-\t\tif (!(params-\u003esta_flags_set \u0026 BIT(NL80211_STA_FLAG_TDLS_PEER)))\n--\nnet/wireless/nl80211.c-8840-\nnet/wireless/nl80211.c:8841:\tif (statype != CFG80211_STA_TDLS_PEER_SETUP \u0026\u0026\nnet/wireless/nl80211.c:8842:\t statype != CFG80211_STA_TDLS_PEER_ACTIVE) {\nnet/wireless/nl80211.c-8843-\t\t/* TDLS can't be set, ... */\n--\nnet/wireless/nl80211.c-8853-\nnet/wireless/nl80211.c:8854:\tif (statype != CFG80211_STA_TDLS_PEER_SETUP \u0026\u0026\nnet/wireless/nl80211.c:8855:\t statype != CFG80211_STA_AP_CLIENT_UNASSOC) {\nnet/wireless/nl80211.c-8856-\t\t/* reject other things that can't change */\n--\nnet/wireless/nl80211.c-8862-\t\t\treturn -EINVAL;\nnet/wireless/nl80211.c:8863:\t\tif (statype != CFG80211_STA_NAN_MGMT \u0026\u0026\nnet/wireless/nl80211.c-8864-\t\t (params-\u003elink_sta_params.ht_capa ||\n--\nnet/wireless/nl80211.c-8874-\nnet/wireless/nl80211.c:8875:\tif (statype != CFG80211_STA_AP_CLIENT \u0026\u0026\nnet/wireless/nl80211.c:8876:\t statype != CFG80211_STA_AP_CLIENT_UNASSOC) {\nnet/wireless/nl80211.c-8877-\t\tif (params-\u003evlan)\n--\nnet/wireless/nl80211.c-8881-\t/* Accept EMLSR capabilities only for AP client before association */\nnet/wireless/nl80211.c:8882:\tif (statype != CFG80211_STA_AP_CLIENT_UNASSOC \u0026\u0026\nnet/wireless/nl80211.c-8883-\t params-\u003eeml_cap_present)\n--\nnet/wireless/nl80211.c-8886-\tswitch (statype) {\nnet/wireless/nl80211.c:8887:\tcase CFG80211_STA_AP_MLME_CLIENT:\nnet/wireless/nl80211.c-8888-\t\t/* Use this only for authorizing/unauthorizing a station */\n--\nnet/wireless/nl80211.c-8891-\t\tbreak;\nnet/wireless/nl80211.c:8892:\tcase CFG80211_STA_AP_CLIENT:\nnet/wireless/nl80211.c:8893:\tcase CFG80211_STA_AP_CLIENT_UNASSOC:\nnet/wireless/nl80211.c-8894-\t\t/* accept only the listed bits */\n--\nnet/wireless/nl80211.c-8911-\t\tbreak;\nnet/wireless/nl80211.c:8912:\tcase CFG80211_STA_IBSS:\nnet/wireless/nl80211.c:8913:\tcase CFG80211_STA_AP_STA:\nnet/wireless/nl80211.c-8914-\t\t/* reject any changes other than AUTHORIZED */\n--\nnet/wireless/nl80211.c-8917-\t\tbreak;\nnet/wireless/nl80211.c:8918:\tcase CFG80211_STA_TDLS_PEER_SETUP:\nnet/wireless/nl80211.c-8919-\t\t/* reject any changes other than AUTHORIZED or WME */\n--\nnet/wireless/nl80211.c-8927-\t\tbreak;\nnet/wireless/nl80211.c:8928:\tcase CFG80211_STA_TDLS_PEER_ACTIVE:\nnet/wireless/nl80211.c-8929-\t\t/* reject any changes */\nnet/wireless/nl80211.c-8930-\t\treturn -EINVAL;\nnet/wireless/nl80211.c:8931:\tcase CFG80211_STA_MESH_PEER_KERNEL:\nnet/wireless/nl80211.c-8932-\t\tif (params-\u003esta_modify_mask \u0026 STATION_PARAM_APPLY_PLINK_STATE)\n--\nnet/wireless/nl80211.c-8934-\t\tbreak;\nnet/wireless/nl80211.c:8935:\tcase CFG80211_STA_MESH_PEER_USER:\nnet/wireless/nl80211.c-8936-\t\tif (params-\u003eplink_action != NL80211_PLINK_ACTION_NO_ACTION \u0026\u0026\n--\nnet/wireless/nl80211.c-8939-\t\tbreak;\nnet/wireless/nl80211.c:8940:\tcase CFG80211_STA_NAN_MGMT:\nnet/wireless/nl80211.c-8941-\t\tif (params-\u003esta_flags_mask \u0026\n--\nnet/wireless/nl80211.c-8945-\t\tbreak;\nnet/wireless/nl80211.c:8946:\tcase CFG80211_STA_NAN_DATA:\nnet/wireless/nl80211.c-8947-\t\tif (params-\u003esta_flags_mask \u0026\n--\nnet/wireless/nl80211.c-8959-\t */\nnet/wireless/nl80211.c:8960:\tif (statype != CFG80211_STA_AP_CLIENT_UNASSOC \u0026\u0026\nnet/wireless/nl80211.c:8961:\t statype != CFG80211_STA_TDLS_PEER_SETUP)\nnet/wireless/nl80211.c-8962-\t\tparams-\u003elink_sta_params.opmode_notif_used = false;\n--\nnet/wireless/nl80211.c=10804=static int nl80211_get_reg_dump(struct sk_buff *skb,\n--\nnet/wireless/nl80211.c-10845-\nnet/wireless/nl80211.c:10846:#ifdef CONFIG_CFG80211_CRDA_SUPPORT\nnet/wireless/nl80211.c-10847-static const struct nla_policy reg_rule_policy[NL80211_REG_RULE_ATTR_MAX + 1] = {\n--\nnet/wireless/nl80211.c=10897=static int nl80211_set_reg(struct sk_buff *skb, struct genl_info *info)\n--\nnet/wireless/nl80211.c-10975-}\nnet/wireless/nl80211.c:10976:#endif /* CONFIG_CFG80211_CRDA_SUPPORT */\nnet/wireless/nl80211.c-10977-\n--\nnet/wireless/nl80211.c=12399=static int nl80211_send_bss(struct sk_buff *msg, struct netlink_callback *cb,\n--\nnet/wireless/nl80211.c-12496-\t\tswitch (rdev-\u003ewiphy.signal_type) {\nnet/wireless/nl80211.c:12497:\t\tcase CFG80211_SIGNAL_TYPE_MBM:\nnet/wireless/nl80211.c-12498-\t\t\tif (nla_put_u32(msg, NL80211_BSS_SIGNAL_MBM,\n--\nnet/wireless/nl80211.c-12501-\t\t\tbreak;\nnet/wireless/nl80211.c:12502:\t\tcase CFG80211_SIGNAL_TYPE_UNSPEC:\nnet/wireless/nl80211.c-12503-\t\t\tif (nla_put_u8(msg, NL80211_BSS_SIGNAL_UNSPEC,\n--\nnet/wireless/nl80211.c=16543=static int nl80211_parse_nan_conf(struct wiphy *wiphy,\n--\nnet/wireless/nl80211.c-16557-\nnet/wireless/nl80211.c:16558:\t\tchanged |= CFG80211_NAN_CONF_CHANGED_PREF;\nnet/wireless/nl80211.c-16559-\t}\n--\nnet/wireless/nl80211.c-16570-\t\tconf-\u003ebands = bands;\nnet/wireless/nl80211.c:16571:\t\tchanged |= CFG80211_NAN_CONF_CHANGED_BANDS;\nnet/wireless/nl80211.c-16572-\t}\n--\nnet/wireless/nl80211.c-16592-\nnet/wireless/nl80211.c:16593:\tchanged |= CFG80211_NAN_CONF_CHANGED_CONFIG;\nnet/wireless/nl80211.c-16594-\tif (attrs[NL80211_NAN_CONF_CLUSTER_ID] \u0026\u0026 start) {\n--\nnet/wireless/nl80211.c=17404=nl80211_parse_nan_schedule(struct genl_info *info, struct nlattr *slots_attr,\nnet/wireless/nl80211.c:17405:\t\t\t u8 schedule[CFG80211_NAN_SCHED_NUM_TIME_SLOTS],\nnet/wireless/nl80211.c-17406-\t\t\t u8 n_channels)\nnet/wireless/nl80211.c-17407-{\nnet/wireless/nl80211.c:17408:\tif (WARN_ON(nla_len(slots_attr) != CFG80211_NAN_SCHED_NUM_TIME_SLOTS))\nnet/wireless/nl80211.c-17409-\t\treturn -EINVAL;\n--\nnet/wireless/nl80211.c-17412-\nnet/wireless/nl80211.c:17413:\tfor (int slot = 0; slot \u003c CFG80211_NAN_SCHED_NUM_TIME_SLOTS; slot++) {\nnet/wireless/nl80211.c-17414-\t\tif (schedule[slot] != NL80211_NAN_SCHED_NOT_AVAIL_SLOT \u0026\u0026\n--\nnet/wireless/nl80211.c=17510=static int nl80211_nan_set_peer_sched(struct sk_buff *skb,\n--\nnet/wireless/nl80211.c-17604-\tfor (int j = 0; j \u003c ARRAY_SIZE(sched.maps); j++)\nnet/wireless/nl80211.c:17605:\t\tsched.maps[j].map_id = CFG80211_NAN_INVALID_MAP_ID;\nnet/wireless/nl80211.c-17606-\n--\nnet/wireless/nl80211.c=19230=static int nl80211_set_hw_timestamp(struct sk_buff *skb,\n--\nnet/wireless/nl80211.c-19240-\tif (!info-\u003eattrs[NL80211_ATTR_MAC] \u0026\u0026\nnet/wireless/nl80211.c:19241:\t rdev-\u003ewiphy.hw_timestamp_max_peers != CFG80211_HW_TIMESTAMP_ALL_PEERS)\nnet/wireless/nl80211.c-19242-\t\treturn -EOPNOTSUPP;\n--\nnet/wireless/nl80211.c=19733=static const struct genl_small_ops nl80211_small_ops[] = {\n--\nnet/wireless/nl80211.c-19906-\t},\nnet/wireless/nl80211.c:19907:#ifdef CONFIG_CFG80211_CRDA_SUPPORT\nnet/wireless/nl80211.c-19908-\t{\n--\nnet/wireless/nl80211.c=23407=void cfg80211_schedule_channels_check(struct wireless_dev *wdev)\n--\nnet/wireless/nl80211.c-23414-\t\t\t\t NL80211_EXT_FEATURE_DFS_CONCURRENT) ||\nnet/wireless/nl80211.c:23415:\t (IS_ENABLED(CONFIG_CFG80211_REG_RELAX_NO_IR) \u0026\u0026\nnet/wireless/nl80211.c-23416-\t wiphy-\u003eregulatory_flags \u0026 REGULATORY_ENABLE_RELAX_NO_IR)))\n--\nnet/wireless/rdev-ops.h-6- */\nnet/wireless/rdev-ops.h:7:#ifndef __CFG80211_RDEV_OPS\nnet/wireless/rdev-ops.h:8:#define __CFG80211_RDEV_OPS\nnet/wireless/rdev-ops.h-9-\n--\nnet/wireless/rdev-ops.h=1625=rdev_set_epcs(struct cfg80211_registered_device *rdev,\n--\nnet/wireless/rdev-ops.h-1638-\nnet/wireless/rdev-ops.h:1639:#endif /* __CFG80211_RDEV_OPS */\n--\nnet/wireless/reg.c=497=static int reg_schedule_apply(const struct ieee80211_regdomain *regdom)\n--\nnet/wireless/reg.c-516-\nnet/wireless/reg.c:517:#ifdef CONFIG_CFG80211_CRDA_SUPPORT\nnet/wireless/reg.c-518-/* Max number of consecutive attempts to communicate with CRDA */\n--\nnet/wireless/reg.c=586=static inline int call_crda(const char *alpha2)\n--\nnet/wireless/reg.c-589-}\nnet/wireless/reg.c:590:#endif /* CONFIG_CFG80211_CRDA_SUPPORT */\nnet/wireless/reg.c-591-\n--\nnet/wireless/reg.c=697=static bool valid_country(const u8 *data, unsigned int size,\n--\nnet/wireless/reg.c-729-\nnet/wireless/reg.c:730:#ifdef CONFIG_CFG80211_REQUIRE_SIGNED_REGDB\nnet/wireless/reg.c-731-#include \u003ckeys/asymmetric-type.h\u003e\n--\nnet/wireless/reg.c=735=static int __init load_builtin_regdb_keys(void)\n--\nnet/wireless/reg.c-747-\nnet/wireless/reg.c:748:#ifdef CONFIG_CFG80211_USE_KERNEL_REGDB_KEYS\nnet/wireless/reg.c-749-\tx509_load_certificate_list(shipped_regdb_certs,\n--\nnet/wireless/reg.c-752-#endif\nnet/wireless/reg.c:753:#ifdef CONFIG_CFG80211_EXTRA_REGDB_KEYDIR\nnet/wireless/reg.c:754:\tif (CONFIG_CFG80211_EXTRA_REGDB_KEYDIR[0] != '\\0')\nnet/wireless/reg.c-755-\t\tx509_load_certificate_list(extra_regdb_certs,\n--\nnet/wireless/reg.c=798=static void free_regdb_keyring(void)\n--\nnet/wireless/reg.c-800-}\nnet/wireless/reg.c:801:#endif /* CONFIG_CFG80211_REQUIRE_SIGNED_REGDB */\nnet/wireless/reg.c-802-\n--\nnet/wireless/reg.c=2038=bool reg_last_request_cell_base(void)\n--\nnet/wireless/reg.c-2042-\nnet/wireless/reg.c:2043:#ifdef CONFIG_CFG80211_REG_CELLULAR_HINTS\nnet/wireless/reg.c-2044-/* Core specific check */\n--\nnet/wireless/scan.c=230=static size_t cfg80211_copy_elem_with_frags(const struct element *elem,\n--\nnet/wireless/scan.c-267-\nnet/wireless/scan.c:268:VISIBLE_IF_CFG80211_KUNIT size_t\nnet/wireless/scan.c-269-cfg80211_gen_new_ie(const u8 *ie, size_t ielen,\n--\nnet/wireless/scan.c-406-}\nnet/wireless/scan.c:407:EXPORT_SYMBOL_IF_CFG80211_KUNIT(cfg80211_gen_new_ie);\nnet/wireless/scan.c-408-\n--\nnet/wireless/scan.c=546=static int cfg80211_calc_short_ssid(const struct cfg80211_bss_ies *ies,\n--\nnet/wireless/scan.c-557-\n\n"
} |
| 7/2 | 2026/09/04 16:39 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 15995 output: 30 thoughts: 53 Thoughts: Here's my analysis of the provided code snippet, thinking like an expert: **Diving into Channel Regulation in `net/wireless/reg.c`** Okay, time to take a closer look at `reg_check_chans_work` within `net/wireless/reg.c`. My immediate thought is to understand its role within the broader channel regulation framework. I need to trace its call sites to grasp its purpose and what triggers its execution. I'll need to see the full context around both `reg_check_chans_work` *and* `reg_check_channels`, since they're likely related. I'm assuming one likely calls the other, or they work in tandem. Understanding the dependencies is critical to diagnosing any potential issues or understanding design choices here. I need to see *how* this piece fits into the overall regulatory process, the interactions with different regulatory domains, and how often it's called and by what subsystems. The context will reveal the critical information. I'll need to know what data structures are accessed, what locks are held, and what other functions this function interacts with. Only then can I truly understand this function's contribution to overall system health. |
| 8/2 | 2026/09/04 16:39 | tool | grepper |
0mArgs:{
"Expression": "reg_check_chans",
"PathPrefix": "net/wireless/"
}Results: {
"Output": "net/wireless/reg.c=221=struct reg_beacon {\n--\nnet/wireless/reg.c-225-\nnet/wireless/reg.c:226:static void reg_check_chans_work(struct work_struct *work);\nnet/wireless/reg.c:227:static DECLARE_DELAYED_WORK(reg_check_chans, reg_check_chans_work);\nnet/wireless/reg.c-228-\n--\nnet/wireless/reg.c=2449=static void reg_leave_invalid_chans(struct wiphy *wiphy)\n--\nnet/wireless/reg.c-2463-\nnet/wireless/reg.c:2464:static void reg_check_chans_work(struct work_struct *work)\nnet/wireless/reg.c-2465-{\n--\nnet/wireless/reg.c=2486=void reg_check_channels(void)\n--\nnet/wireless/reg.c-2492-\tmod_delayed_work(system_power_efficient_wq,\nnet/wireless/reg.c:2493:\t\t\t \u0026reg_check_chans,\nnet/wireless/reg.c-2494-\t\t\t msecs_to_jiffies(REG_ENFORCE_GRACE_MS));\n--\nnet/wireless/reg.c=4359=void regulatory_exit(void)\n--\nnet/wireless/reg.c-4365-\tcancel_crda_timeout_sync();\nnet/wireless/reg.c:4366:\tcancel_delayed_work_sync(\u0026reg_check_chans);\nnet/wireless/reg.c-4367-\n"
} |
| 9/2 | 2026/09/04 16:39 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 16759 output: 29 thoughts: 21 Thoughts: Here's my thought process, as requested: **Navigating the Wireless Landscape: Pinpointing `reg_check_channels`** Alright, time to get my hands dirty. I need to understand the call structure around `reg_check_channels` within the `net/wireless/` directory. Given my expertise, I already have a mental map of this area, but a quick search is definitely in order to ensure I'm not missing anything. I'll need to identify all the places where this function is invoked. My initial thought is to probably use `grep`, and quickly look at the results. I expect this function is critical to channel regulation and regulatory domain considerations, and a quick cross reference with surrounding functions is in order. From there, I'll analyze each call site to figure out the context and data it's operating on. That should give me a solid grasp on how this function fits into the overall wireless stack. I'm especially interested in whether it's called synchronously or asynchronously, what data is passed to it, and how the results are used to affect wireless operation. |
| 10/2 | 2026/09/04 16:39 | tool | grepper |
0mArgs:{
"Expression": "reg_check_channels",
"PathPrefix": "net/wireless/"
}Results: {
"Output": "net/wireless/nl80211.c=23407=void cfg80211_schedule_channels_check(struct wireless_dev *wdev)\n--\nnet/wireless/nl80211.c-23416-\t wiphy-\u003eregulatory_flags \u0026 REGULATORY_ENABLE_RELAX_NO_IR)))\nnet/wireless/nl80211.c:23417:\t\treg_check_channels();\nnet/wireless/nl80211.c-23418-}\n--\nnet/wireless/reg.c=2464=static void reg_check_chans_work(struct work_struct *work)\n--\nnet/wireless/reg.c-2485-\nnet/wireless/reg.c:2486:void reg_check_channels(void)\nnet/wireless/reg.c-2487-{\n--\nnet/wireless/reg.c=2527=static void update_all_wiphy_regulatory(enum nl80211_reg_initiator initiator)\n--\nnet/wireless/reg.c-2538-\nnet/wireless/reg.c:2539:\treg_check_channels();\nnet/wireless/reg.c-2540-}\n--\nnet/wireless/reg.c=3025=static void reg_process_hint(struct regulatory_request *reg_request)\n--\nnet/wireless/reg.c-3068-\t\twiphy_all_share_dfs_chan_state(wiphy);\nnet/wireless/reg.c:3069:\t\treg_check_channels();\nnet/wireless/reg.c-3070-\t}\n--\nnet/wireless/reg.c=3197=static void reg_process_self_managed_hints(void)\n--\nnet/wireless/reg.c-3208-\nnet/wireless/reg.c:3209:\treg_check_channels();\nnet/wireless/reg.c-3210-}\n--\nnet/wireless/reg.c=3285=void regulatory_hint_indoor(bool is_indoor, u32 portid)\n--\nnet/wireless/reg.c-3306-\tif (!is_indoor)\nnet/wireless/reg.c:3307:\t\treg_check_channels();\nnet/wireless/reg.c-3308-}\n--\nnet/wireless/reg.c=3310=void regulatory_netlink_notify(u32 portid)\n--\nnet/wireless/reg.c-3323-\nnet/wireless/reg.c:3324:\treg_check_channels();\nnet/wireless/reg.c-3325-}\n--\nnet/wireless/reg.c=3489=static void restore_regulatory_settings(bool reset_user, bool cached)\n--\nnet/wireless/reg.c-3506-\t\treg_is_indoor = false;\nnet/wireless/reg.c:3507:\t\treg_check_channels();\nnet/wireless/reg.c-3508-\t}\n--\nnet/wireless/reg.c=4076=int regulatory_set_wiphy_regd_sync(struct wiphy *wiphy,\n--\nnet/wireless/reg.c-4088-\treg_process_self_managed_hint(wiphy);\nnet/wireless/reg.c:4089:\treg_check_channels();\nnet/wireless/reg.c-4090-\treturn 0;\n--\nnet/wireless/reg.h=174=int reg_reload_regdb(void);\n--\nnet/wireless/reg.h-176-/**\nnet/wireless/reg.h:177: * reg_check_channels - schedule regulatory enforcement\nnet/wireless/reg.h-178- */\nnet/wireless/reg.h:179:void reg_check_channels(void);\nnet/wireless/reg.h-180-\n"
} |
| 11/2 | 2026/09/04 16:39 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 18030 output: 36 thoughts: 51 Thoughts: Here's my take on those thoughts: **Analyzing Channel Leave Handling in the Wireless Subsystem** Alright, let's dive into this. I need to understand how the system handles the process of leaving invalid channels, and I'm seeing two potential areas of interest: `reg_leave_invalid_chans` and `cfg80211_leave`. Sounds like these are likely related, maybe even complementary. Time to get my hands dirty. First stop: `reg_leave_invalid_chans`. I'll be digging into `net/wireless/reg.c` to see how this function works. Let's see how the regulatory domain logic interacts with the channel management. I need to understand how the system identifies, and then gracefully handles, situations where a channel becomes invalid. This is key for ensuring a reliable wireless environment. |
| 12/2 | 2026/09/04 16:39 | tool | read-file |
0mArgs:{
"File": "net/wireless/reg.c",
"FirstLine": 2440,
"LineCount": 35
}Results: {
"Contents": "2440:\t\t\t\tbreak;\n2441:\t\t\tdefault:\n2442:\t\t\t\tbreak;\n2443:\t\t\t}\n2444:\t\t}\n2445:\t\n2446:\t\treturn true;\n2447:\t}\n2448:\t\n2449:\tstatic void reg_leave_invalid_chans(struct wiphy *wiphy)\n2450:\t{\n2451:\t\tstruct wireless_dev *wdev;\n2452:\t\tstruct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);\n2453:\t\n2454:\t\tlist_for_each_entry(wdev, \u0026rdev-\u003ewiphy.wdev_list, list) {\n2455:\t\t\tbool valid;\n2456:\t\n2457:\t\t\tscoped_guard(wiphy, wiphy)\n2458:\t\t\t\tvalid = reg_wdev_chan_valid(wiphy, wdev);\n2459:\t\t\tif (!valid)\n2460:\t\t\t\tcfg80211_leave(rdev, wdev, -1);\n2461:\t\t}\n2462:\t}\n2463:\t\n2464:\tstatic void reg_check_chans_work(struct work_struct *work)\n2465:\t{\n2466:\t\tstruct cfg80211_registered_device *rdev;\n2467:\t\n2468:\t\tpr_debug(\"Verifying active interfaces after reg change\\n\");\n2469:\t\t/*\n2470:\t\t * Acquire rtnl per-device instead of holding it for the entire loop;\n2471:\t\t * cfg80211_leave() can be slow and starve other rtnl waiters otherwise.\n2472:\t\t * wiphy_unregister() holds rtnl across list_del_rcu() + synchronize_rcu(),\n2473:\t\t * so rdev cannot be freed while we hold rtnl_lock() below.\n2474:\t\t */\n"
} |
| 13/2 | 2026/09/04 16:39 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 18825 output: 31 thoughts: 825 Thoughts: **RCU List Traversal Bug in cfg80211: A Critical Vulnerability** Okay, here's what I'm seeing. The code's changed to use `list_for_each_entry_rcu` to iterate through the `cfg80211_rdev_list`, which is good for concurrency. However, the placement of the `rcu_read_lock()` and `rcu_read_unlock()` calls within the loop is a major red flag. Specifically, between the `rcu_read_unlock()` and the subsequent `rcu_read_lock()` calls, there's a window where an RCU grace period *could* elapse. If a thread unregisters an `rdev` during that grace period, a subsequent `list_del_rcu` or `kfree_rcu` could happen. Then, when the loop reacquires the `rcu_read_lock` and tries to access `rdev->list.next`, it's potentially pointing to freed or corrupted memory. This is a textbook RCU list traversal bug, a classic Use-After-Free scenario, and it screams memory corruption. This bug is reachable kernel code. My next thought: "Is this exploitable?" Based on the reachability analysis, this is very interesting. The cfg80211 subsystem is well-supported by syzkaller. I can create virtual Wi-Fi devices or send nl80211 messages, even with an unprivileged user in a net namespace or, with mac80211_hwsim, in user namespaces. This means there's a wide attack surface, especially with capabilities like CAP_NET_ADMIN. Checking the "WorthFuzzing" criteria confirms the potential. We've got standard virtualized environments, it's in the networking/wireless subsystem (`net/wireless/reg.c`), and it modifies executable logic, especially synchronization and RCU traversal, which makes it a high-value target for fuzzing. We can test this by looking at `reg_check_chans_work` to trigger the bug. Finally, regarding configuration, it looks like `CONFIG_CFG80211` is essential, and after a quick glance at the relevant `Kconfig` and `Makefile` files, there aren't any obvious other dependencies to consider for a basic setup. This looks pretty straightforward to reproduce and exploit. |
| 14/2 | 2026/09/04 16:40 | tool | read-file |
0mArgs:{
"File": "net/wireless/Makefile",
"FirstLine": 1,
"LineCount": 25
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: GPL-2.0\n 2:\tobj-$(CONFIG_CFG80211) += cfg80211.o\n 3:\tobj-y += tests/\n 4:\t\n 5:\tobj-$(CONFIG_WEXT_CORE) += wext-core.o\n 6:\tobj-$(CONFIG_WEXT_PROC) += wext-proc.o\n 7:\tobj-$(CONFIG_WEXT_PRIV) += wext-priv.o\n 8:\t\n 9:\tcfg80211-y += core.o sysfs.o radiotap.o util.o reg.o scan.o nl80211.o\n 10:\tcfg80211-y += mlme.o ibss.o sme.o chan.o ethtool.o mesh.o ap.o trace.o ocb.o\n 11:\tcfg80211-y += michael-mic.o pmsr.o\n 12:\tcfg80211-$(CONFIG_OF) += of.o\n 13:\tcfg80211-$(CONFIG_CFG80211_DEBUGFS) += debugfs.o\n 14:\tcfg80211-$(CONFIG_CFG80211_WEXT) += wext-compat.o wext-sme.o\n 15:\t\n 16:\tCFLAGS_trace.o := -I$(src)\n 17:\t\n 18:\tcfg80211-$(CONFIG_CFG80211_USE_KERNEL_REGDB_KEYS) += shipped-certs.o\n 19:\tifneq ($(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR),)\n 20:\tcfg80211-y += extra-certs.o\n 21:\tendif\n 22:\t\n 23:\t$(obj)/shipped-certs.c: $(sort $(wildcard $(src)/certs/*.hex))\n 24:\t\t@$(kecho) \" GEN $@\"\n 25:\t\t$(Q)(echo '#include \"reg.h\"'; \\\n"
} |
| 15/2 | 2026/09/04 16:40 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 20743 output: 33 thoughts: 103 Thoughts: **Investigating CFG80211's Dependencies** Alright, let's dive in. I'm looking at this `CFG80211` config, and it's enabling `net/wireless/reg.o`. Hmm, okay. Now, the question is, what other pieces might be tied to this? I should probably check if `MAC80211_HWSIM` or `NL80211` have any bearing on this. Where would I find that? Right, the Kconfig files. Time to check the `Kconfig` for `CFG80211`. Seems pretty straightforward, it enables the `cfg80211` subsystem, but I need to understand if there are any indirect dependencies, things that `CFG80211` itself relies upon. To get the full picture, I need to open up `net/wireless/Kconfig` and see if `CFG80211` has any dependencies. That should illuminate the relationships here. |
| 16/2 | 2026/09/04 16:40 | tool | read-file |
0mArgs:{
"File": "net/wireless/Kconfig",
"FirstLine": 15,
"LineCount": 25
}Results: {
"Contents": " 15:\t\tbool\n 16:\t\n 17:\tconfig CFG80211\n 18:\t\ttristate \"cfg80211 - wireless configuration API\"\n 19:\t\tdepends on RFKILL || !RFKILL\n 20:\t\tselect FW_LOADER\n 21:\t\tselect CRC32\n 22:\t\t# may need to update this when certificates are changed and are\n 23:\t\t# using a different algorithm, though right now they shouldn't\n 24:\t\t# (this is here rather than below to allow it to be a module)\n 25:\t\tselect CRYPTO_SHA256 if CFG80211_USE_KERNEL_REGDB_KEYS\n 26:\t\thelp\n 27:\t\t cfg80211 is the Linux wireless LAN (802.11) configuration API.\n 28:\t\t Enable this if you have a wireless device.\n 29:\t\n 30:\t\t For more information refer to documentation on the wireless wiki:\n 31:\t\n 32:\t\t https://wireless.wiki.kernel.org/en/developers/Documentation/cfg80211\n 33:\t\n 34:\t\t When built as a module it will be called cfg80211.\n 35:\t\n 36:\tif CFG80211\n 37:\t\n 38:\tconfig NL80211_TESTMODE\n 39:\t\tbool \"nl80211 testmode command\"\n"
} |
| 17/2 | 2026/09/04 16:40 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 21489 output: 36 thoughts: 119 Thoughts: **Analyzing Regulatory Changes in CFG80211** Okay, so `CFG80211` is the core configuration here – that’s the starting point. Now, I need to pinpoint exactly what's changed and where the entry points are affected. The patch directly modifies `reg_check_chans_work`, that's my primary focus. However, I need to check the surrounding code. I'll also have to check `reg_leave_invalid_chans` and `reg_check_channels`, as these functions seem to be related and might have dependencies on the changes. Then there's the question of the network layer, either `nl80211_req_set_reg` or `nl80211_set_reg` – I need to determine the specific regulatory entrypoints within `nl80211` to fully understand the impact. I need to make sure I am covering all possible entry points. |
| 18/2 | 2026/09/04 16:40 | tool | grepper |
0mArgs:{
"Expression": "NL80211_CMD_SET_REG",
"PathPrefix": "net/wireless/"
}Results: {
"Output": "net/wireless/nl80211.c=19733=static const struct genl_small_ops nl80211_small_ops[] = {\n--\nnet/wireless/nl80211.c-19908-\t{\nnet/wireless/nl80211.c:19909:\t\t.cmd = NL80211_CMD_SET_REG,\nnet/wireless/nl80211.c-19910-\t\t.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,\n"
} |
| 19/2 | 2026/09/04 16:40 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 22013 output: 36 thoughts: 42 Thoughts: Okay, let's break this down. **Diving into the nl80211 Regulation Setting Functions** Right, so I'm digging into the regulatory aspects within the nl80211 wireless networking stack, and I'm homing in on the functions responsible for setting regulatory domain information. Specifically, I'm looking at `nl80211_req_set_reg` and `nl80211_set_reg`, both of which are defined in `nl80211.c`. My immediate thought is, 'Okay, these are the key entry points for configuring the regulatory database through the nl80211 interface.' I suspect `nl80211_req_set_reg` is the higher-level request handler, likely parsing the Netlink message, and then passing the relevant data to `nl80211_set_reg` for the actual regulatory database updates. I need to understand how the data is validated, how the regulatory database is modified, and the implications of those changes on the wireless device's behavior. Time to delve into the code! |
| 20/2 | 2026/09/04 16:40 | tool | grepper |
0mArgs:{
"Expression": "nl80211_req_set_reg",
"PathPrefix": "net/wireless/"
}Results: {
"Output": "net/wireless/nl80211.c=10062=static int nl80211_set_bss(struct sk_buff *skb, struct genl_info *info)\n--\nnet/wireless/nl80211.c-10169-\nnet/wireless/nl80211.c:10170:static int nl80211_req_set_reg(struct sk_buff *skb, struct genl_info *info)\nnet/wireless/nl80211.c-10171-{\n--\nnet/wireless/nl80211.c=19733=static const struct genl_small_ops nl80211_small_ops[] = {\n--\nnet/wireless/nl80211.c-19917-\t\t.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,\nnet/wireless/nl80211.c:19918:\t\t.doit = nl80211_req_set_reg,\nnet/wireless/nl80211.c-19919-\t\t.flags = GENL_ADMIN_PERM,\n"
} |
| 21/2 | 2026/09/04 16:40 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 22648 output: 265 thoughts: 356 Thoughts: **My Assessment of the Regulatory Core Patch** Okay, let's see, I've got a patch here that's changing the iteration method in `reg_check_chans_work` within the wireless regulatory core (`net/wireless/reg.c`). Specifically, it's replacing a global RTNL lock for the whole loop with a per-iteration RTNL lock inside an RCU traversal. Right off the bat, that screams race condition potential. I see the code using `list_for_each_entry_rcu`, then dropping and re-acquiring the RCU read lock within the loop, which means possible use-after-free or iterator problems if devices are unregistered mid-iteration while the RCU read lock isn't held. This is worth a closer look for fuzzing – definitely `WorthFuzzing: true`. The code is fully reachable via wireless netlink interfaces (`nl80211`), and we have access through virtual wifi drivers such as (`mac80211_hwsim`), so we can trigger this code path. I've already confirmed that my `FocusSymbols` are correct - `reg_check_chans_work`, `reg_leave_invalid_chans`, `reg_check_channels`, and `nl80211_req_set_reg`. And given that `CFG80211` is enabled in my build environment, this makes the patch relevant. Alright, I'm confident in this analysis. Everything seems solid. Time to proceed. |
| 22/2 | 2026/09/04 16:40 | tool | set-results |
0mArgs:{
"EnableConfigs": [
"CFG80211"
],
"FocusSymbols": [
"reg_check_chans_work",
"reg_leave_invalid_chans",
"reg_check_channels",
"nl80211_req_set_reg"
],
"Reasoning": "The patch modifies the locking and RCU traversal mechanism in `reg_check_chans_work()` in `net/wireless/reg.c`. Instead of holding RTNL throughout the iteration over `cfg80211_rdev_list`, it uses `list_for_each_entry_rcu()` and releases/re-acquires `rcu_read_lock()` across loop iterations to acquire RTNL per-device. Dropping `rcu_read_lock()` within an RCU list traversal introduces a potential use-after-free / dangling list pointer race condition if registered devices are removed during the iteration. The code is fully reachable via nl80211 regulatory netlink requests and virtual Wi-Fi devices (e.g., mac80211_hwsim), making it a prime candidate for syzkaller fuzzing.",
"WorthFuzzing": true
}Results: {
"EnableConfigs": [
"CFG80211"
],
"FocusSymbols": [
"reg_check_chans_work",
"reg_leave_invalid_chans",
"reg_check_channels",
"nl80211_req_set_reg"
],
"Reasoning": "The patch modifies the locking and RCU traversal mechanism in `reg_check_chans_work()` in `net/wireless/reg.c`. Instead of holding RTNL throughout the iteration over `cfg80211_rdev_list`, it uses `list_for_each_entry_rcu()` and releases/re-acquires `rcu_read_lock()` across loop iterations to acquire RTNL per-device. Dropping `rcu_read_lock()` within an RCU list traversal introduces a potential use-after-free / dangling list pointer race condition if registered devices are removed during the iteration. The code is fully reachable via nl80211 regulatory netlink requests and virtual Wi-Fi devices (e.g., mac80211_hwsim), making it a prime candidate for syzkaller fuzzing.",
"WorthFuzzing": true
} |
| 23/1 | 2026/09/04 16:40 | action | If |
0mArgs:{
"WorthFuzzing": true
}Results: null |
| 24/2 | 2026/09/04 16:40 | agent | kmsan-evaluator |
0mModel:core Args: null Results: {
"KMSANReasoning": "The patch modifies the locking scheme and iteration over `cfg80211_rdev_list` in `reg_check_chans_work()`, replacing a global `rtnl_lock()` around the loop with fine-grained per-device `rtnl_lock()` / `rcu_read_lock()` toggling.\n\nThis change does not allocate any new memory buffers, does not copy kernel data to user space, and does not alter any initialization or reading of uninitialized fields. Any potential issues introduced by this patch relate strictly to concurrency, RCU lifetime rules, and locking (such as list traversal races or use-after-free if an element is deleted during the unlocked window), which are covered by KASAN and LOCKDEP. Therefore, dedicated KMSAN fuzzing is not needed.",
"NeedsKMSAN": false
}Instruction: You are an expert Linux kernel security engineer specializing in kernel memory
error detectors (KASAN and KMSAN). Your job is to review the provided patch series and
determine if the code changes justify spawning a dedicated KMSAN (KernelMemorySanitizer)
fuzzing session in addition to standard KASAN fuzzing.
CRITICAL DISTINCTION BETWEEN KASAN AND KMSAN:
- Standard KASAN kernel builds (upstream-apparmor-kasan.config) already enable
a comprehensive suite of debugging tools and sanitizers, including KASAN
(out-of-bounds accesses, use-after-free, double free, invalid free), LOCKDEP
(locking bugs and deadlocks), UB-sanitizers, and memory corruption checks.
- KMSAN (KernelMemorySanitizer) detects reads of UNINITIALIZED memory (stack, heap,
or page allocations) and kernel-to-user memory info-leaks.
Rule: THERE IS NO SENSE IN RUNNING A KMSAN SESSION IF A BUG CAN BE CAUGHT BY KASAN,
LOCKDEP, OR OTHER STANDARD BUG DETECTORS.
A dedicated KMSAN fuzzing session incurs significant resource costs. You must ONLY
set NeedsKMSAN=true if the code changes introduce or expose UNINITIALIZED MEMORY risks
that are detected ONLY by KMSAN.
Look holistically at the patch series and surrounding code. Even if no direct
uninitialized field accesses or new buffer allocations are added in the diff itself,
a patch may alter control flow, bounds checking, or data length calculations in ways
that change how the rest of the code operates on existing buffers (e.g. allowing
uninitialized stack/heap memory to be read, copied to user space, or used in control
flow). Do not hesitate to use your code access tools to inspect the surrounding code,
called functions, and callers.
Set NeedsKMSAN=true ONLY IF the patch introduces or modifies:
1. Kernel structures sent to user space (via copy_to_user, put_user, netlink skb
attributes, ioctl output arguments, socket options, or BPF buffers) where fields
or structure padding might not be fully initialized/zeroed.
2. Conditional logic or branching that depends on potentially uninitialized variables
or struct fields.
3. Allocation or initialization of complex data structures where uninitialized fields
could be read later in reachable code paths.
4. Bounds checks, lengths, or logic in a way that allows surrounding code to access
uninitialized bytes of existing buffers.
Set NeedsKMSAN=false IF:
- The code changes primarily risk out-of-bounds access, array overflows, NULL pointer
dereferences, locking deadlocks, or use-after-free bugs (these are already caught
by KASAN, LOCKDEP, or standard bug detectors).
- All stack/heap structures touched or introduced by the patch are fully zeroed
or initialized (e.g. using = {0}, memset, kzalloc) before being read or copied.
- The patch does not introduce any risk of uninitialized memory usage or info-leaks.
Use your code access tools to inspect the surrounding code if necessary, then provide
detailed KMSANReasoning contrasting KASAN vs KMSAN applicability for this patch.
Prefer calling several tools at the same time to save round-trips.
Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.
Prompt: Target architecture: amd64
For your convenience, here is the diff of the changes:
commit c9e52d74776e6e75d23855a51b76cf5f7a10813b
Author: syz-cluster <triage@syzkaller.com>
Date: Fri Sep 4 16:39:00 2026 +0000
syz-cluster: applied patch under review
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index a8336baf85dc6..a2e0d1cf8317c 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -2466,12 +2466,21 @@ static void reg_check_chans_work(struct work_struct *work)
struct cfg80211_registered_device *rdev;
pr_debug("Verifying active interfaces after reg change\n");
- rtnl_lock();
-
- for_each_rdev(rdev)
+ /*
+ * Acquire rtnl per-device instead of holding it for the entire loop;
+ * cfg80211_leave() can be slow and starve other rtnl waiters otherwise.
+ * wiphy_unregister() holds rtnl across list_del_rcu() + synchronize_rcu(),
+ * so rdev cannot be freed while we hold rtnl_lock() below.
+ */
+ rcu_read_lock();
+ list_for_each_entry_rcu(rdev, &cfg80211_rdev_list, list) {
+ rcu_read_unlock();
+ rtnl_lock();
reg_leave_invalid_chans(&rdev->wiphy);
-
- rtnl_unlock();
+ rtnl_unlock();
+ rcu_read_lock();
+ }
+ rcu_read_unlock();
}
void reg_check_channels(void)
|
| 25/3 | 2026/09/04 16:40 | llm | kmsan-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 2281 output: 32 thoughts: 582 Thoughts: **KMSAN Fuzzing Session Assessment**
Okay, so I need to decide if this patch series warrants a dedicated KMSAN fuzzing session. Let's break this down. The request is primarily about code review and sanitizer selection, focusing on defensive or benign QA. The patch specifically targets `net/wireless/reg.c`.
Looking at the code change in `reg_check_chans_work`, it appears we're transitioning from a simple `rtnl_lock()`-based approach to an RCU-read-locked iteration:
```c
// Before
rtnl_lock();
for_each_rdev(rdev)
reg_leave_invalid_chans(&rdev->wiphy);
rtnl_unlock();
// Now
rcu_read_lock();
list_for_each_entry_rcu(rdev, &cfg80211_rdev_list, list) {
rcu_read_unlock();
rtnl_lock();
reg_leave_invalid_chans(&rdev->wiphy);
rtnl_unlock();
rcu_read_lock();
}
rcu_read_unlock();
```
My initial thought is to check for potential uninitialized memory usage, locking issues, concurrency concerns, RCU safety issues, and possible use-after-free scenarios. Hold on a second, that `list_for_each_entry_rcu` with the `rcu_read_unlock(); rtnl_lock(); ... rtnl_unlock(); rcu_read_lock();` sequence... that's a red flag! The loop advances `rdev` via `list_entry_rcu(pos->member.next, ...)`. During the unlocked window, `rdev` or its `next` pointer could be modified or deleted, which could lead to a UAF or potentially traversing a deleted list node.
However, any potential bug here is almost certainly a concurrency, RCU, locking, or Use-After-Free issue or list corruption – which is typically caught by KASAN, LOCKDEP, or general kernel warnings.
Now, does this *introduce* or *expose* uninitialized memory? Let's go through the KMSAN criteria:
1. Is there kernel data being sent to user space where fields or padding might be uninitialized? No indication here.
2. Is there conditional logic or branching that relies on potentially uninitialized variables or struct fields? No obvious logic or conditional branching.
3. Is there the allocation or initialization of complex data structures where uninitialized fields could be read later? This patch doesn't appear to introduce any significant new allocation or complex data structures.
4. Does the patch affect bounds checks, lengths, or logic in a way that allows surrounding code to access uninitialized bytes? I don't see anything obvious.
To be absolutely certain, I need to thoroughly search the code surrounding `reg_check_chans_work` to rule out any subtle gotchas. After a full scan, it is unlikely this needs a dedicated KMSAN fuzzing session, this appears to be more of a RCU/concurrency correctness issue.
|
| 26/3 | 2026/09/04 16:41 | tool | grepper |
0mArgs:{
"Expression": "reg_check_chans_work",
"PathPrefix": "net/wireless/"
}Results: {
"Output": "net/wireless/reg.c=221=struct reg_beacon {\n--\nnet/wireless/reg.c-225-\nnet/wireless/reg.c:226:static void reg_check_chans_work(struct work_struct *work);\nnet/wireless/reg.c:227:static DECLARE_DELAYED_WORK(reg_check_chans, reg_check_chans_work);\nnet/wireless/reg.c-228-\n--\nnet/wireless/reg.c=2449=static void reg_leave_invalid_chans(struct wiphy *wiphy)\n--\nnet/wireless/reg.c-2463-\nnet/wireless/reg.c:2464:static void reg_check_chans_work(struct work_struct *work)\nnet/wireless/reg.c-2465-{\n"
} |
| 27/3 | 2026/09/04 16:41 | llm | kmsan-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 3799 output: 36 thoughts: 26 Thoughts: Here's a first-person summary, tailored as requested: **Diving into the Regulatory Details** Alright, time to get my hands dirty. I need to understand what's going on with the regulatory domain handling within the wireless stack. I'm going to zero in on `net/wireless/reg.c` and specifically, I'm aiming for the region around lines 2440 to 2480. That chunk should be revealing something significant about how the driver interprets, processes, or interacts with regulatory information. Hopefully, this section has some pointers to the regulatory database parsing, country code handling, or perhaps the logic behind channel selection based on the current regulatory domain. I expect to be able to quickly spot the critical data structures and function calls responsible for this aspect of wireless operation. Let's see what gems I can unearth! |
| 28/3 | 2026/09/04 16:41 | tool | read-file |
0mArgs:{
"File": "net/wireless/reg.c",
"FirstLine": 2445,
"LineCount": 40
}Results: {
"Contents": "2445:\t\n2446:\t\treturn true;\n2447:\t}\n2448:\t\n2449:\tstatic void reg_leave_invalid_chans(struct wiphy *wiphy)\n2450:\t{\n2451:\t\tstruct wireless_dev *wdev;\n2452:\t\tstruct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);\n2453:\t\n2454:\t\tlist_for_each_entry(wdev, \u0026rdev-\u003ewiphy.wdev_list, list) {\n2455:\t\t\tbool valid;\n2456:\t\n2457:\t\t\tscoped_guard(wiphy, wiphy)\n2458:\t\t\t\tvalid = reg_wdev_chan_valid(wiphy, wdev);\n2459:\t\t\tif (!valid)\n2460:\t\t\t\tcfg80211_leave(rdev, wdev, -1);\n2461:\t\t}\n2462:\t}\n2463:\t\n2464:\tstatic void reg_check_chans_work(struct work_struct *work)\n2465:\t{\n2466:\t\tstruct cfg80211_registered_device *rdev;\n2467:\t\n2468:\t\tpr_debug(\"Verifying active interfaces after reg change\\n\");\n2469:\t\t/*\n2470:\t\t * Acquire rtnl per-device instead of holding it for the entire loop;\n2471:\t\t * cfg80211_leave() can be slow and starve other rtnl waiters otherwise.\n2472:\t\t * wiphy_unregister() holds rtnl across list_del_rcu() + synchronize_rcu(),\n2473:\t\t * so rdev cannot be freed while we hold rtnl_lock() below.\n2474:\t\t */\n2475:\t\trcu_read_lock();\n2476:\t\tlist_for_each_entry_rcu(rdev, \u0026cfg80211_rdev_list, list) {\n2477:\t\t\trcu_read_unlock();\n2478:\t\t\trtnl_lock();\n2479:\t\t\treg_leave_invalid_chans(\u0026rdev-\u003ewiphy);\n2480:\t\t\trtnl_unlock();\n2481:\t\t\trcu_read_lock();\n2482:\t\t}\n2483:\t\trcu_read_unlock();\n2484:\t}\n"
} |
| 29/3 | 2026/09/04 16:41 | llm | kmsan-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 4682 output: 193 thoughts: 125 Thoughts: **Reasoning Through a Patch** Okay, so I've been reviewing this patch and need to determine if it requires KMSAN. Looking closely, all the modifications are constrained to `reg_check_chans_work` – just locking and loop iteration logic. That immediately narrows the scope considerably. Crucially, it's *not* touching allocation, copying uninitialized memory, passing data to userspace, changing any buffer lengths, messing with bounds, or altering the fundamental data structures. The absence of those common sources of memory errors is a big plus. It also doesn't introduce reads of uninitialized variables or struct fields, which is another common KMSAN trigger I check for. Given this focused scope, the *potential* bugs I'm envisioning are all going to be concurrency-related: race conditions, RCU use-after-free, or issues with lock ordering. However, we're covered there. KASAN and LOCKDEP are designed specifically to catch precisely these kinds of errors. That's a good safety net. Therefore, after this careful examination, it's clear that this patch doesn't introduce any memory safety vulnerabilities that KMSAN would be specifically designed to catch. I am confident in setting `NeedsKMSAN` to `false` and documenting the rationale for the maintainers, making sure to highlight the limited scope and the protection offered by existing tools. |
| 30/3 | 2026/09/04 16:41 | tool | set-results |
0mArgs:{
"KMSANReasoning": "The patch modifies the locking scheme and iteration over `cfg80211_rdev_list` in `reg_check_chans_work()`, replacing a global `rtnl_lock()` around the loop with fine-grained per-device `rtnl_lock()` / `rcu_read_lock()` toggling.\n\nThis change does not allocate any new memory buffers, does not copy kernel data to user space, and does not alter any initialization or reading of uninitialized fields. Any potential issues introduced by this patch relate strictly to concurrency, RCU lifetime rules, and locking (such as list traversal races or use-after-free if an element is deleted during the unlocked window), which are covered by KASAN and LOCKDEP. Therefore, dedicated KMSAN fuzzing is not needed.",
"NeedsKMSAN": false
}Results: {
"KMSANReasoning": "The patch modifies the locking scheme and iteration over `cfg80211_rdev_list` in `reg_check_chans_work()`, replacing a global `rtnl_lock()` around the loop with fine-grained per-device `rtnl_lock()` / `rcu_read_lock()` toggling.\n\nThis change does not allocate any new memory buffers, does not copy kernel data to user space, and does not alter any initialization or reading of uninitialized fields. Any potential issues introduced by this patch relate strictly to concurrency, RCU lifetime rules, and locking (such as list traversal races or use-after-free if an element is deleted during the unlocked window), which are covered by KASAN and LOCKDEP. Therefore, dedicated KMSAN fuzzing is not needed.",
"NeedsKMSAN": false
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|