| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/08/16 18:33 | flow | patch-triage |
0mArgs:null Results: {
"EnableConfigs": [
"RTW89",
"RTW89_8851BU",
"RTW89_8852AU",
"RTW89_8852BU",
"RTW89_8852CU",
"RTW89_8922AU"
],
"FocusSymbols": [
"rtw8851bu_probe",
"rtw8852au_probe",
"rtw8852bu_probe",
"rtw8852cu_probe",
"rtw8922au_probe",
"rtw89_usb_probe"
],
"KMSANReasoning": "The patch fixes a potential NULL pointer dereference that occurs when `id-\u003edriver_info` is 0 (which can happen when a USB device is bound dynamically via sysfs `new_id`). The fix provides a fallback to a static driver info structure. This does not involve uninitialized memory reads or information leaks to userspace. Standard KASAN and kernel oops mechanisms are fully capable of detecting NULL pointer dereferences, so a dedicated KMSAN fuzzing session is not required.",
"NeedsKMSAN": false,
"Reasoning": "The patch introduces wrapper functions for USB probe in several rtw89 drivers to handle cases where `id-\u003edriver_info` is NULL, preventing a potential null pointer dereference in `rtw89_usb_probe`. This is a functional change in the USB probe path, which is reachable in virtualized environments via dummy_hcd.",
"WorthFuzzing": true
} |
| 1/1 | 2026/08/16 18:33 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 90237a4cbeac80fa695f700d539c3449b2ab153a\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Sun Aug 16 18:33:58 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/wireless/realtek/rtw89/rtw8851bu.c b/drivers/net/wireless/realtek/rtw89/rtw8851bu.c\nindex 1e827205f2540..432d216de8746 100644\n--- a/drivers/net/wireless/realtek/rtw89/rtw8851bu.c\n+++ b/drivers/net/wireless/realtek/rtw89/rtw8851bu.c\n@@ -59,10 +59,23 @@ static const struct usb_device_id rtw_8851bu_id_table[] = {\n };\n MODULE_DEVICE_TABLE(usb, rtw_8851bu_id_table);\n \n+static int rtw8851bu_probe(struct usb_interface *intf,\n+\t\t\t const struct usb_device_id *id)\n+{\n+\tconst struct rtw89_driver_info *info;\n+\n+\tif (id-\u003edriver_info)\n+\t\tinfo = (const struct rtw89_driver_info *)id-\u003edriver_info;\n+\telse\n+\t\tinfo = \u0026rtw89_8851bu_info;\n+\n+\treturn rtw89_usb_probe(intf, info);\n+}\n+\n static struct usb_driver rtw_8851bu_driver = {\n \t.name = KBUILD_MODNAME,\n \t.id_table = rtw_8851bu_id_table,\n-\t.probe = rtw89_usb_probe,\n+\t.probe = rtw8851bu_probe,\n \t.disconnect = rtw89_usb_disconnect,\n };\n module_usb_driver(rtw_8851bu_driver);\ndiff --git a/drivers/net/wireless/realtek/rtw89/rtw8852au.c b/drivers/net/wireless/realtek/rtw89/rtw8852au.c\nindex 065f4e5b17afa..a37b60b584f24 100644\n--- a/drivers/net/wireless/realtek/rtw89/rtw8852au.c\n+++ b/drivers/net/wireless/realtek/rtw89/rtw8852au.c\n@@ -73,10 +73,23 @@ static const struct usb_device_id rtw_8852au_id_table[] = {\n };\n MODULE_DEVICE_TABLE(usb, rtw_8852au_id_table);\n \n+static int rtw8852au_probe(struct usb_interface *intf,\n+\t\t\t const struct usb_device_id *id)\n+{\n+\tconst struct rtw89_driver_info *info;\n+\n+\tif (id-\u003edriver_info)\n+\t\tinfo = (const struct rtw89_driver_info *)id-\u003edriver_info;\n+\telse\n+\t\tinfo = \u0026rtw89_8852au_info;\n+\n+\treturn rtw89_usb_probe(intf, info);\n+}\n+\n static struct usb_driver rtw_8852au_driver = {\n \t.name = KBUILD_MODNAME,\n \t.id_table = rtw_8852au_id_table,\n-\t.probe = rtw89_usb_probe,\n+\t.probe = rtw8852au_probe,\n \t.disconnect = rtw89_usb_disconnect,\n };\n module_usb_driver(rtw_8852au_driver);\ndiff --git a/drivers/net/wireless/realtek/rtw89/rtw8852bu.c b/drivers/net/wireless/realtek/rtw89/rtw8852bu.c\nindex de79a19a2824d..81b6156a8d27e 100644\n--- a/drivers/net/wireless/realtek/rtw89/rtw8852bu.c\n+++ b/drivers/net/wireless/realtek/rtw89/rtw8852bu.c\n@@ -73,10 +73,23 @@ static const struct usb_device_id rtw_8852bu_id_table[] = {\n };\n MODULE_DEVICE_TABLE(usb, rtw_8852bu_id_table);\n \n+static int rtw8852bu_probe(struct usb_interface *intf,\n+\t\t\t const struct usb_device_id *id)\n+{\n+\tconst struct rtw89_driver_info *info;\n+\n+\tif (id-\u003edriver_info)\n+\t\tinfo = (const struct rtw89_driver_info *)id-\u003edriver_info;\n+\telse\n+\t\tinfo = \u0026rtw89_8852bu_info;\n+\n+\treturn rtw89_usb_probe(intf, info);\n+}\n+\n static struct usb_driver rtw_8852bu_driver = {\n \t.name = KBUILD_MODNAME,\n \t.id_table = rtw_8852bu_id_table,\n-\t.probe = rtw89_usb_probe,\n+\t.probe = rtw8852bu_probe,\n \t.disconnect = rtw89_usb_disconnect,\n };\n module_usb_driver(rtw_8852bu_driver);\ndiff --git a/drivers/net/wireless/realtek/rtw89/rtw8852cu.c b/drivers/net/wireless/realtek/rtw89/rtw8852cu.c\nindex 2dec9b8454815..067c6bb007b31 100644\n--- a/drivers/net/wireless/realtek/rtw89/rtw8852cu.c\n+++ b/drivers/net/wireless/realtek/rtw89/rtw8852cu.c\n@@ -133,10 +133,23 @@ static const struct usb_device_id rtw_8852cu_id_table[] = {\n };\n MODULE_DEVICE_TABLE(usb, rtw_8852cu_id_table);\n \n+static int rtw8852cu_probe(struct usb_interface *intf,\n+\t\t\t const struct usb_device_id *id)\n+{\n+\tconst struct rtw89_driver_info *info;\n+\n+\tif (id-\u003edriver_info)\n+\t\tinfo = (const struct rtw89_driver_info *)id-\u003edriver_info;\n+\telse\n+\t\tinfo = \u0026rtw89_8852cu_info;\n+\n+\treturn rtw89_usb_probe(intf, info);\n+}\n+\n static struct usb_driver rtw_8852cu_driver = {\n \t.name = KBUILD_MODNAME,\n \t.id_table = rtw_8852cu_id_table,\n-\t.probe = rtw89_usb_probe,\n+\t.probe = rtw8852cu_probe,\n \t.disconnect = rtw89_usb_disconnect,\n };\n module_usb_driver(rtw_8852cu_driver);\ndiff --git a/drivers/net/wireless/realtek/rtw89/rtw8922au.c b/drivers/net/wireless/realtek/rtw89/rtw8922au.c\nindex 56c79b1ec865f..2f60021704e08 100644\n--- a/drivers/net/wireless/realtek/rtw89/rtw8922au.c\n+++ b/drivers/net/wireless/realtek/rtw89/rtw8922au.c\n@@ -74,10 +74,23 @@ static const struct usb_device_id rtw_8922au_id_table[] = {\n };\n MODULE_DEVICE_TABLE(usb, rtw_8922au_id_table);\n \n+static int rtw8922au_probe(struct usb_interface *intf,\n+\t\t\t const struct usb_device_id *id)\n+{\n+\tconst struct rtw89_driver_info *info;\n+\n+\tif (id-\u003edriver_info)\n+\t\tinfo = (const struct rtw89_driver_info *)id-\u003edriver_info;\n+\telse\n+\t\tinfo = \u0026rtw89_8922au_info;\n+\n+\treturn rtw89_usb_probe(intf, info);\n+}\n+\n static struct usb_driver rtw_8922au_driver = {\n \t.name = KBUILD_MODNAME,\n \t.id_table = rtw_8922au_id_table,\n-\t.probe = rtw89_usb_probe,\n+\t.probe = rtw8922au_probe,\n \t.disconnect = rtw89_usb_disconnect,\n };\n module_usb_driver(rtw_8922au_driver);\ndiff --git a/drivers/net/wireless/realtek/rtw89/usb.c b/drivers/net/wireless/realtek/rtw89/usb.c\nindex aafa8b9e93dfc..1d7c74557ab13 100644\n--- a/drivers/net/wireless/realtek/rtw89/usb.c\n+++ b/drivers/net/wireless/realtek/rtw89/usb.c\n@@ -1201,15 +1201,12 @@ static const struct attribute_group rtw89_usb_group = {\n __ATTRIBUTE_GROUPS(rtw89_usb);\n \n int rtw89_usb_probe(struct usb_interface *intf,\n-\t\t const struct usb_device_id *id)\n+\t\t const struct rtw89_driver_info *info)\n {\n-\tconst struct rtw89_driver_info *info;\n \tstruct rtw89_dev *rtwdev;\n \tstruct rtw89_usb *rtwusb;\n \tint ret;\n \n-\tinfo = (const struct rtw89_driver_info *)id-\u003edriver_info;\n-\n \trtwdev = rtw89_alloc_ieee80211_hw(\u0026intf-\u003edev,\n \t\t\t\t\t sizeof(struct rtw89_usb), info);\n \tif (!rtwdev) {\ndiff --git a/drivers/net/wireless/realtek/rtw89/usb.h b/drivers/net/wireless/realtek/rtw89/usb.h\nindex bdf3125597438..372620d0851e6 100644\n--- a/drivers/net/wireless/realtek/rtw89/usb.h\n+++ b/drivers/net/wireless/realtek/rtw89/usb.h\n@@ -95,7 +95,7 @@ static inline struct rtw89_usb *rtw89_usb_priv(struct rtw89_dev *rtwdev)\n }\n \n int rtw89_usb_probe(struct usb_interface *intf,\n-\t\t const struct usb_device_id *id);\n+\t\t const struct rtw89_driver_info *info);\n void rtw89_usb_disconnect(struct usb_interface *intf);\n \n #endif\n"
} |
| 2/1 | 2026/08/16 18:34 | agent | patch-evaluator |
0mModel:best-expensive Args: null Results: {
"EnableConfigs": [
"RTW89",
"RTW89_8851BU",
"RTW89_8852AU",
"RTW89_8852BU",
"RTW89_8852CU",
"RTW89_8922AU"
],
"FocusSymbols": [
"rtw8851bu_probe",
"rtw8852au_probe",
"rtw8852bu_probe",
"rtw8852cu_probe",
"rtw8922au_probe",
"rtw89_usb_probe"
],
"Reasoning": "The patch introduces wrapper functions for USB probe in several rtw89 drivers to handle cases where `id-\u003edriver_info` is NULL, preventing a potential null pointer dereference in `rtw89_usb_probe`. This is a functional change in the USB probe path, which is reachable in virtualized environments via dummy_hcd.",
"WorthFuzzing": true
}Instruction: You are an expert Linux kernel maintainer. Your job is to review a provided patch series and determine if it makes functional changes to the kernel that should be fuzzed. IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in your workspace. Do NOT rely on your internal knowledge of the kernel. You must actively use your code access tools to examine the actual source code and confirm any assumptions. Return WorthFuzzing=false if the patch only contains: - Modifications to Documentation/, Kconfig files, or code comments. - Purely decorative changes, such as logging (e.g., pr_err, printk) or tracepoints. - Changes to numeric constants or macros that do not functionally alter execution flow. - Code paths that are impossible to reach in virtualized environments like GCE or QEMU, even when utilizing software-emulated hardware (e.g., usb gadget, mac80211_hwsim). - Code in vendor-specific PCIe switch, SmartNIC, or GPU drivers (e.g., mlxsw, pds_core, qed, ionic, amdgpu) that require physical PCIe hardware cards not emulated in standard QEMU. - Driver .remove, .shutdown, or pci_unregister_driver teardown callbacks (e.g., igb_remove) that are executed only during PCI hot-unplug or sysfs driver unbind operations. If it modifies reachable core kernel logic, drivers, or architectures, use your code search tools to verify the code can be executed, then return WorthFuzzing=true. When returning WorthFuzzing=true, you MUST ALSO: 1. Extract any specific kernel functions that should be heavily fuzzed into FocusSymbols. Avoid listing generic hot-path functions to prevent skewed test distributions. Prefer non-static, non-inlined API entrypoint functions over internal static helper functions (which are inlined by the compiler and do not have distinct symbol addresses). 2. Identify any specific CONFIG_ options required to properly test this new/modified feature. Go and look into the Kconfig files and check for ifdefs around the code, do not make assumptions. Also check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed for Kbuild to compile the code statically into vmlinux. List them in the EnableConfigs output array, and DO NOT add a '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: For your convenience, here is the diff of the changes:
commit 90237a4cbeac80fa695f700d539c3449b2ab153a
Author: syz-cluster <triage@syzkaller.com>
Date: Sun Aug 16 18:33:58 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8851bu.c b/drivers/net/wireless/realtek/rtw89/rtw8851bu.c
index 1e827205f2540..432d216de8746 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8851bu.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8851bu.c
@@ -59,10 +59,23 @@ static const struct usb_device_id rtw_8851bu_id_table[] = {
};
MODULE_DEVICE_TABLE(usb, rtw_8851bu_id_table);
+static int rtw8851bu_probe(struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ const struct rtw89_driver_info *info;
+
+ if (id->driver_info)
+ info = (const struct rtw89_driver_info *)id->driver_info;
+ else
+ info = &rtw89_8851bu_info;
+
+ return rtw89_usb_probe(intf, info);
+}
+
static struct usb_driver rtw_8851bu_driver = {
.name = KBUILD_MODNAME,
.id_table = rtw_8851bu_id_table,
- .probe = rtw89_usb_probe,
+ .probe = rtw8851bu_probe,
.disconnect = rtw89_usb_disconnect,
};
module_usb_driver(rtw_8851bu_driver);
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852au.c b/drivers/net/wireless/realtek/rtw89/rtw8852au.c
index 065f4e5b17afa..a37b60b584f24 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8852au.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8852au.c
@@ -73,10 +73,23 @@ static const struct usb_device_id rtw_8852au_id_table[] = {
};
MODULE_DEVICE_TABLE(usb, rtw_8852au_id_table);
+static int rtw8852au_probe(struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ const struct rtw89_driver_info *info;
+
+ if (id->driver_info)
+ info = (const struct rtw89_driver_info *)id->driver_info;
+ else
+ info = &rtw89_8852au_info;
+
+ return rtw89_usb_probe(intf, info);
+}
+
static struct usb_driver rtw_8852au_driver = {
.name = KBUILD_MODNAME,
.id_table = rtw_8852au_id_table,
- .probe = rtw89_usb_probe,
+ .probe = rtw8852au_probe,
.disconnect = rtw89_usb_disconnect,
};
module_usb_driver(rtw_8852au_driver);
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852bu.c b/drivers/net/wireless/realtek/rtw89/rtw8852bu.c
index de79a19a2824d..81b6156a8d27e 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8852bu.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8852bu.c
@@ -73,10 +73,23 @@ static const struct usb_device_id rtw_8852bu_id_table[] = {
};
MODULE_DEVICE_TABLE(usb, rtw_8852bu_id_table);
+static int rtw8852bu_probe(struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ const struct rtw89_driver_info *info;
+
+ if (id->driver_info)
+ info = (const struct rtw89_driver_info *)id->driver_info;
+ else
+ info = &rtw89_8852bu_info;
+
+ return rtw89_usb_probe(intf, info);
+}
+
static struct usb_driver rtw_8852bu_driver = {
.name = KBUILD_MODNAME,
.id_table = rtw_8852bu_id_table,
- .probe = rtw89_usb_probe,
+ .probe = rtw8852bu_probe,
.disconnect = rtw89_usb_disconnect,
};
module_usb_driver(rtw_8852bu_driver);
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852cu.c b/drivers/net/wireless/realtek/rtw89/rtw8852cu.c
index 2dec9b8454815..067c6bb007b31 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8852cu.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8852cu.c
@@ -133,10 +133,23 @@ static const struct usb_device_id rtw_8852cu_id_table[] = {
};
MODULE_DEVICE_TABLE(usb, rtw_8852cu_id_table);
+static int rtw8852cu_probe(struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ const struct rtw89_driver_info *info;
+
+ if (id->driver_info)
+ info = (const struct rtw89_driver_info *)id->driver_info;
+ else
+ info = &rtw89_8852cu_info;
+
+ return rtw89_usb_probe(intf, info);
+}
+
static struct usb_driver rtw_8852cu_driver = {
.name = KBUILD_MODNAME,
.id_table = rtw_8852cu_id_table,
- .probe = rtw89_usb_probe,
+ .probe = rtw8852cu_probe,
.disconnect = rtw89_usb_disconnect,
};
module_usb_driver(rtw_8852cu_driver);
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8922au.c b/drivers/net/wireless/realtek/rtw89/rtw8922au.c
index 56c79b1ec865f..2f60021704e08 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8922au.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8922au.c
@@ -74,10 +74,23 @@ static const struct usb_device_id rtw_8922au_id_table[] = {
};
MODULE_DEVICE_TABLE(usb, rtw_8922au_id_table);
+static int rtw8922au_probe(struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ const struct rtw89_driver_info *info;
+
+ if (id->driver_info)
+ info = (const struct rtw89_driver_info *)id->driver_info;
+ else
+ info = &rtw89_8922au_info;
+
+ return rtw89_usb_probe(intf, info);
+}
+
static struct usb_driver rtw_8922au_driver = {
.name = KBUILD_MODNAME,
.id_table = rtw_8922au_id_table,
- .probe = rtw89_usb_probe,
+ .probe = rtw8922au_probe,
.disconnect = rtw89_usb_disconnect,
};
module_usb_driver(rtw_8922au_driver);
diff --git a/drivers/net/wireless/realtek/rtw89/usb.c b/drivers/net/wireless/realtek/rtw89/usb.c
index aafa8b9e93dfc..1d7c74557ab13 100644
--- a/drivers/net/wireless/realtek/rtw89/usb.c
+++ b/drivers/net/wireless/realtek/rtw89/usb.c
@@ -1201,15 +1201,12 @@ static const struct attribute_group rtw89_usb_group = {
__ATTRIBUTE_GROUPS(rtw89_usb);
int rtw89_usb_probe(struct usb_interface *intf,
- const struct usb_device_id *id)
+ const struct rtw89_driver_info *info)
{
- const struct rtw89_driver_info *info;
struct rtw89_dev *rtwdev;
struct rtw89_usb *rtwusb;
int ret;
- info = (const struct rtw89_driver_info *)id->driver_info;
-
rtwdev = rtw89_alloc_ieee80211_hw(&intf->dev,
sizeof(struct rtw89_usb), info);
if (!rtwdev) {
diff --git a/drivers/net/wireless/realtek/rtw89/usb.h b/drivers/net/wireless/realtek/rtw89/usb.h
index bdf3125597438..372620d0851e6 100644
--- a/drivers/net/wireless/realtek/rtw89/usb.h
+++ b/drivers/net/wireless/realtek/rtw89/usb.h
@@ -95,7 +95,7 @@ static inline struct rtw89_usb *rtw89_usb_priv(struct rtw89_dev *rtwdev)
}
int rtw89_usb_probe(struct usb_interface *intf,
- const struct usb_device_id *id);
+ const struct rtw89_driver_info *info);
void rtw89_usb_disconnect(struct usb_interface *intf);
#endif
|
| 3/2 | 2026/08/16 18:34 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 4682 output: 41 thoughts: 336 Thoughts: **My Analysis of the rtw89 Wireless Driver Patch** Okay, so this patch is targeting the `rtw89` wireless driver, specifically dealing with Realtek 802.11ax hardware – interesting. It looks like the main point here is a change in how the `rtw89_usb_probe` function is called, specifically for USB devices. I see that instead of directly passing the `usb_device_id` struct to the probe function, there's now a wrapper probe function introduced for each specific device type: `rtw8851bu`, `rtw8852au`, etc. The critical part is the check for `id->driver_info`. If `driver_info` isn't set, which I assume can happen under specific circumstances, the wrapper now falls back to a default info struct, for example `&rtw89_8851bu_info`. *This is a good catch.* Previously, if `id->driver_info` *was* NULL, `rtw89_usb_probe` would have blindly cast that NULL pointer to `const struct rtw89_driver_info *` and almost certainly crashed the kernel when dereferencing it. A classic null pointer dereference, and likely a good target for fuzzing. It's happening within the USB probe path, and that's important. This means that even in virtualized environments like the ones used with syzkaller using USB gadget emulations, this code path is reachable. Given that vulnerability research is my focus, that makes it even more interesting. Now, let me check the configuration options for these drivers to see how easily they can be enabled or disabled and understand the scope of their use. I'll use `grepper` to locate the `Kconfig` files and see what I can find. Understanding the configuration options gives me a sense of the potential attack surface. |
| 4/2 | 2026/08/16 18:34 | tool | grepper |
0mArgs:{
"Expression": "config RTW89",
"PathPrefix": "drivers/net/wireless/realtek/rtw89/Kconfig"
}Results: {
"Output": "drivers/net/wireless/realtek/rtw89/Kconfig-1-# SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause\ndrivers/net/wireless/realtek/rtw89/Kconfig:2:menuconfig RTW89\ndrivers/net/wireless/realtek/rtw89/Kconfig-3-\ttristate \"Realtek 802.11ax wireless chips support\"\n--\ndrivers/net/wireless/realtek/rtw89/Kconfig=11=if RTW89\ndrivers/net/wireless/realtek/rtw89/Kconfig-12-\ndrivers/net/wireless/realtek/rtw89/Kconfig:13:config RTW89_CORE\ndrivers/net/wireless/realtek/rtw89/Kconfig-14-\ttristate\n--\ndrivers/net/wireless/realtek/rtw89/Kconfig-16-\ndrivers/net/wireless/realtek/rtw89/Kconfig:17:config RTW89_PCI\ndrivers/net/wireless/realtek/rtw89/Kconfig-18-\ttristate\ndrivers/net/wireless/realtek/rtw89/Kconfig-19-\ndrivers/net/wireless/realtek/rtw89/Kconfig:20:config RTW89_USB\ndrivers/net/wireless/realtek/rtw89/Kconfig-21-\ttristate\ndrivers/net/wireless/realtek/rtw89/Kconfig-22-\ndrivers/net/wireless/realtek/rtw89/Kconfig:23:config RTW89_8851B\ndrivers/net/wireless/realtek/rtw89/Kconfig-24-\ttristate\ndrivers/net/wireless/realtek/rtw89/Kconfig-25-\ndrivers/net/wireless/realtek/rtw89/Kconfig:26:config RTW89_8852A\ndrivers/net/wireless/realtek/rtw89/Kconfig-27-\ttristate\ndrivers/net/wireless/realtek/rtw89/Kconfig-28-\ndrivers/net/wireless/realtek/rtw89/Kconfig:29:config RTW89_8852B_COMMON\ndrivers/net/wireless/realtek/rtw89/Kconfig-30-\ttristate\ndrivers/net/wireless/realtek/rtw89/Kconfig-31-\ndrivers/net/wireless/realtek/rtw89/Kconfig:32:config RTW89_8852B\ndrivers/net/wireless/realtek/rtw89/Kconfig-33-\ttristate\ndrivers/net/wireless/realtek/rtw89/Kconfig-34-\ndrivers/net/wireless/realtek/rtw89/Kconfig:35:config RTW89_8852BT\ndrivers/net/wireless/realtek/rtw89/Kconfig-36-\ttristate\ndrivers/net/wireless/realtek/rtw89/Kconfig-37-\ndrivers/net/wireless/realtek/rtw89/Kconfig:38:config RTW89_8852C\ndrivers/net/wireless/realtek/rtw89/Kconfig-39-\ttristate\ndrivers/net/wireless/realtek/rtw89/Kconfig-40-\ndrivers/net/wireless/realtek/rtw89/Kconfig:41:config RTW89_8922A\ndrivers/net/wireless/realtek/rtw89/Kconfig-42-\ttristate\ndrivers/net/wireless/realtek/rtw89/Kconfig-43-\ndrivers/net/wireless/realtek/rtw89/Kconfig:44:config RTW89_8922D\ndrivers/net/wireless/realtek/rtw89/Kconfig-45-\ttristate\ndrivers/net/wireless/realtek/rtw89/Kconfig-46-\ndrivers/net/wireless/realtek/rtw89/Kconfig:47:config RTW89_8851BE\ndrivers/net/wireless/realtek/rtw89/Kconfig-48-\ttristate \"Realtek 8851BE PCI wireless network (Wi-Fi 6) adapter\"\n--\ndrivers/net/wireless/realtek/rtw89/Kconfig-57-\ndrivers/net/wireless/realtek/rtw89/Kconfig:58:config RTW89_8851BU\ndrivers/net/wireless/realtek/rtw89/Kconfig-59-\ttristate \"Realtek 8851BU USB wireless network (Wi-Fi 6) adapter\"\n--\ndrivers/net/wireless/realtek/rtw89/Kconfig-68-\ndrivers/net/wireless/realtek/rtw89/Kconfig:69:config RTW89_8852AE\ndrivers/net/wireless/realtek/rtw89/Kconfig-70-\ttristate \"Realtek 8852AE PCI wireless network (Wi-Fi 6) adapter\"\n--\ndrivers/net/wireless/realtek/rtw89/Kconfig-79-\ndrivers/net/wireless/realtek/rtw89/Kconfig:80:config RTW89_8852AU\ndrivers/net/wireless/realtek/rtw89/Kconfig-81-\ttristate \"Realtek 8852AU USB wireless network (Wi-Fi 6) adapter\"\n--\ndrivers/net/wireless/realtek/rtw89/Kconfig-90-\ndrivers/net/wireless/realtek/rtw89/Kconfig:91:config RTW89_8852BE\ndrivers/net/wireless/realtek/rtw89/Kconfig-92-\ttristate \"Realtek 8852BE PCI wireless network (Wi-Fi 6) adapter\"\n--\ndrivers/net/wireless/realtek/rtw89/Kconfig-102-\ndrivers/net/wireless/realtek/rtw89/Kconfig:103:config RTW89_8852BU\ndrivers/net/wireless/realtek/rtw89/Kconfig-104-\ttristate \"Realtek 8852BU USB wireless network (Wi-Fi 6) adapter\"\n--\ndrivers/net/wireless/realtek/rtw89/Kconfig-114-\ndrivers/net/wireless/realtek/rtw89/Kconfig:115:config RTW89_8852BTE\ndrivers/net/wireless/realtek/rtw89/Kconfig-116-\ttristate \"Realtek 8852BE-VT PCI wireless network (Wi-Fi 6) adapter\"\n--\ndrivers/net/wireless/realtek/rtw89/Kconfig-126-\ndrivers/net/wireless/realtek/rtw89/Kconfig:127:config RTW89_8852CE\ndrivers/net/wireless/realtek/rtw89/Kconfig-128-\ttristate \"Realtek 8852CE PCI wireless network (Wi-Fi 6E) adapter\"\n--\ndrivers/net/wireless/realtek/rtw89/Kconfig-137-\ndrivers/net/wireless/realtek/rtw89/Kconfig:138:config RTW89_8852CU\ndrivers/net/wireless/realtek/rtw89/Kconfig-139-\ttristate \"Realtek 8852CU USB wireless network (Wi-Fi 6E) adapter\"\n--\ndrivers/net/wireless/realtek/rtw89/Kconfig-148-\ndrivers/net/wireless/realtek/rtw89/Kconfig:149:config RTW89_8922AE\ndrivers/net/wireless/realtek/rtw89/Kconfig-150-\ttristate \"Realtek 8922AE/8922AE-VS PCI wireless network (Wi-Fi 7) adapter\"\n--\ndrivers/net/wireless/realtek/rtw89/Kconfig-162-\ndrivers/net/wireless/realtek/rtw89/Kconfig:163:config RTW89_8922AU\ndrivers/net/wireless/realtek/rtw89/Kconfig-164-\ttristate \"Realtek 8922AU USB wireless network (Wi-Fi 7) adapter\"\n--\ndrivers/net/wireless/realtek/rtw89/Kconfig-174-\ndrivers/net/wireless/realtek/rtw89/Kconfig:175:config RTW89_8922DE\ndrivers/net/wireless/realtek/rtw89/Kconfig-176-\ttristate \"Realtek 8922DE/8922DE-VS PCI wireless network (Wi-Fi 7) adapter\"\n--\ndrivers/net/wireless/realtek/rtw89/Kconfig-186-\ndrivers/net/wireless/realtek/rtw89/Kconfig:187:config RTW89_DEBUG\ndrivers/net/wireless/realtek/rtw89/Kconfig-188-\tbool\ndrivers/net/wireless/realtek/rtw89/Kconfig-189-\ndrivers/net/wireless/realtek/rtw89/Kconfig:190:config RTW89_DEBUGMSG\ndrivers/net/wireless/realtek/rtw89/Kconfig-191-\tbool \"Realtek rtw89 debug message support\"\n--\ndrivers/net/wireless/realtek/rtw89/Kconfig-198-\ndrivers/net/wireless/realtek/rtw89/Kconfig:199:config RTW89_DEBUGFS\ndrivers/net/wireless/realtek/rtw89/Kconfig-200-\tbool \"Realtek rtw89 debugfs support\"\n--\ndrivers/net/wireless/realtek/rtw89/Kconfig-207-\ndrivers/net/wireless/realtek/rtw89/Kconfig:208:config RTW89_LEDS\ndrivers/net/wireless/realtek/rtw89/Kconfig-209-\tbool\n--\ndrivers/net/wireless/realtek/rtw89/Kconfig-214-\ndrivers/net/wireless/realtek/rtw89/Kconfig:215:config RTW89_LEDS_MC\ndrivers/net/wireless/realtek/rtw89/Kconfig-216-\tbool\n"
} |
| 5/2 | 2026/08/16 18:34 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 8122 output: 47 thoughts: 84 Thoughts: Here's my summary, as the expert: **Investigating the Configuration Landscape** Okay, so I'm looking at these configurations: RTW89_8851BU, RTW89_8852AU, RTW89_8852BU, RTW89_8852CU, and RTW89_8922AU. It seems pretty clear that these are the primary contenders we're working with. Now, the question is, how does RTW89_USB fit into this picture? It's likely that one or more of these configs implicitly select or depend on RTW89_USB, but it's crucial to confirm that. I need to dig a little deeper to ensure everything is appropriately configured and that there aren't any redundancies or omissions. Let's start by checking the dependencies and included files for each of the main configurations. |
| 6/2 | 2026/08/16 18:34 | tool | grepper |
0mArgs:{
"Expression": "config RTW89_8851BU",
"PathPrefix": "drivers/net/wireless/realtek/rtw89/Kconfig"
}Results: {
"Output": "drivers/net/wireless/realtek/rtw89/Kconfig=47=config RTW89_8851BE\n--\ndrivers/net/wireless/realtek/rtw89/Kconfig-57-\ndrivers/net/wireless/realtek/rtw89/Kconfig:58:config RTW89_8851BU\ndrivers/net/wireless/realtek/rtw89/Kconfig-59-\ttristate \"Realtek 8851BU USB wireless network (Wi-Fi 6) adapter\"\n"
} |
| 7/2 | 2026/08/16 18:34 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 8594 output: 43 thoughts: 19 Thoughts: Okay, here's my interpretation of that thought process, tailored for an expert audience, and written in the first person: **Diving into the RTW89_8851BU Kconfig** Alright, time to get my hands dirty. Let's pull up the relevant Kconfig file and start dissecting the configuration options surrounding the RTW89_8851BU. This usually means I'm looking for a specific feature, debugging a reported issue, or assessing the impact of a potential change. My initial focus will be on understanding the dependencies, default values, and any tristate configurations that are present. I want to see how this particular driver is integrated into the broader Realtek WiFi ecosystem within the kernel. I'll be paying close attention to any conditional compilation or inclusion guards. Specifically, I'll be looking for any hints about power management, regulatory domain settings, and perhaps even early indications about interface-specific flags like USB versus SDIO implementations. It is probable, I will be thinking about how it is integrated into the wider framework. Ultimately, my goal is to build a mental map of this module's configurable aspects and how they play together. |
| 8/2 | 2026/08/16 18:34 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/realtek/rtw89/Kconfig",
"FirstLine": 58,
"LineCount": 50
}Results: {
"Contents": " 58:\tconfig RTW89_8851BU\n 59:\t\ttristate \"Realtek 8851BU USB wireless network (Wi-Fi 6) adapter\"\n 60:\t\tdepends on USB\n 61:\t\tselect RTW89_CORE\n 62:\t\tselect RTW89_USB\n 63:\t\tselect RTW89_8851B\n 64:\t\thelp\n 65:\t\t Select this option will enable support for 8851BU chipset\n 66:\t\n 67:\t\t 802.11ax USB wireless network (Wi-Fi 6) adapter\n 68:\t\n 69:\tconfig RTW89_8852AE\n 70:\t\ttristate \"Realtek 8852AE PCI wireless network (Wi-Fi 6) adapter\"\n 71:\t\tdepends on PCI\n 72:\t\tselect RTW89_CORE\n 73:\t\tselect RTW89_PCI\n 74:\t\tselect RTW89_8852A\n 75:\t\thelp\n 76:\t\t Select this option will enable support for 8852AE chipset\n 77:\t\n 78:\t\t 802.11ax PCIe wireless network (Wi-Fi 6) adapter\n 79:\t\n 80:\tconfig RTW89_8852AU\n 81:\t\ttristate \"Realtek 8852AU USB wireless network (Wi-Fi 6) adapter\"\n 82:\t\tdepends on USB\n 83:\t\tselect RTW89_CORE\n 84:\t\tselect RTW89_USB\n 85:\t\tselect RTW89_8852A\n 86:\t\thelp\n 87:\t\t Select this option will enable support for 8852AU chipset\n 88:\t\n 89:\t\t 802.11ax USB wireless network (Wi-Fi 6) adapter\n 90:\t\n 91:\tconfig RTW89_8852BE\n 92:\t\ttristate \"Realtek 8852BE PCI wireless network (Wi-Fi 6) adapter\"\n 93:\t\tdepends on PCI\n 94:\t\tselect RTW89_CORE\n 95:\t\tselect RTW89_PCI\n 96:\t\tselect RTW89_8852B\n 97:\t\tselect RTW89_8852B_COMMON\n 98:\t\thelp\n 99:\t\t Select this option will enable support for 8852BE chipset\n 100:\t\n 101:\t\t 802.11ax PCIe wireless network (Wi-Fi 6) adapter\n 102:\t\n 103:\tconfig RTW89_8852BU\n 104:\t\ttristate \"Realtek 8852BU USB wireless network (Wi-Fi 6) adapter\"\n 105:\t\tdepends on USB\n 106:\t\tselect RTW89_CORE\n 107:\t\tselect RTW89_USB\n"
} |
| 9/2 | 2026/08/16 18:34 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 9679 output: 42 thoughts: 171 Thoughts: **My Initial Assessment of the RTW89 Driver Landscape** Okay, let's break this down. My immediate focus is on the RTW89 series, specifically the USB variants based on the configurations listed: RTW89_8851BU, RTW89_8852AU, RTW89_8852BU, RTW89_8852CU, and RTW89_8922AU. These are the configurations I need to understand. I see a clear set of probe functions corresponding to each configuration: `rtw8851bu_probe`, `rtw8852au_probe`, `rtw8852bu_probe`, `rtw8852cu_probe`, and `rtw8922au_probe`, as well as the more generic `rtw89_usb_probe`. These are the entry points I need to investigate to understand how each hardware variant is initialized and managed. Before I dive too deep into the code, I'll quickly check for any other related configurations that might influence the RTW89 series. The `menuconfig` option is `RTW89`, which, as expected, depends on the `MAC80211` framework. I should make sure I understand that dependency, but first, I will go to the top of `Kconfig` for the overall context. Gotta check the big picture before zooming in on the specifics. |
| 10/2 | 2026/08/16 18:34 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/realtek/rtw89/Kconfig",
"FirstLine": 1,
"LineCount": 20
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause\n 2:\tmenuconfig RTW89\n 3:\t\ttristate \"Realtek 802.11ax wireless chips support\"\n 4:\t\tdepends on MAC80211\n 5:\t\thelp\n 6:\t\t This module adds support for mac80211-based wireless drivers that\n 7:\t\t enables Realtek IEEE 802.11ax wireless chipsets.\n 8:\t\n 9:\t\t If you choose to build a module, it'll be called rtw89.\n 10:\t\n 11:\tif RTW89\n 12:\t\n 13:\tconfig RTW89_CORE\n 14:\t\ttristate\n 15:\t\tselect WANT_DEV_COREDUMP\n 16:\t\n 17:\tconfig RTW89_PCI\n 18:\t\ttristate\n 19:\t\n 20:\tconfig RTW89_USB\n"
} |
| 11/2 | 2026/08/16 18:34 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 10479 output: 49 thoughts: 189 Thoughts: **My Initial Assessment of the RTW89 Driver Configuration** Okay, so we're diving into the Realtek wireless situation. My initial thought is that we're dealing with a specific set of hardware here – likely focusing on the RTW89 chipset. I see we need to ensure the RTW89 module itself is enabled, along with specific sub-modules: RTW89_8851BU, RTW89_8852AU, RTW89_8852BU, RTW89_8852CU, and RTW89_8922AU. This tells me we have a range of potential hardware revisions or configurations we need to support within this general RTW89 framework. I'll need to double check the kernel config options to ensure these are all selected. The inclusion of MAC80211 and USB is expected, given this is wireless hardware. MAC80211 is the standard wireless stack, and USB is the likely physical interface. Now, I need to understand the probe functions for each of those sub-modules. The focus symbols give me a clear list of the entry points: `rtw8851bu_probe`, `rtw8852au_probe`, `rtw8852bu_probe`, `rtw8852cu_probe`, and `rtw8922au_probe`, along with the overarching `rtw89_usb_probe`. These are the functions responsible for initializing the hardware. Finally, I'm specifically interested in the `rtw89_usb_probe` function. I need to quickly verify that it's actually exported – meaning it's visible and callable from other parts of the kernel. A quick check of `drivers/net/wireless/realtek/rtw89/usb.c` will confirm this. This is the entry point for the RTW89 USB driver, and if it's not exported, we've got a problem. |
| 12/2 | 2026/08/16 18:34 | tool | grepper |
0mArgs:{
"Expression": "EXPORT_SYMBOL.*rtw89_usb_probe",
"PathPrefix": "drivers/net/wireless/realtek/rtw89/usb.c"
}Results: {
"Output": "drivers/net/wireless/realtek/rtw89/usb.c=1203=int rtw89_usb_probe(struct usb_interface *intf,\n--\ndrivers/net/wireless/realtek/rtw89/usb.c-1291-}\ndrivers/net/wireless/realtek/rtw89/usb.c:1292:EXPORT_SYMBOL(rtw89_usb_probe);\ndrivers/net/wireless/realtek/rtw89/usb.c-1293-\n"
} |
| 13/2 | 2026/08/16 18:34 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 11293 output: 243 thoughts: 256 Thoughts: **My Assessment of the Patch** Okay, so I see this patch has been exported. Good. It addresses a critical functional issue within the rtw89 USB drivers. Specifically, it guards against the possibility of `id->driver_info` being NULL during probe functions like `rtw8851bu_probe`, `rtw8852au_probe`, etc. This potential NULL dereference was a serious vulnerability; a crash waiting to happen. The core of this fix is the introduction of wrapper functions. Effectively, it's a null check being added to the USB probe flow. The inclusion of `WorthFuzzing: true` is spot on, given this is now more robust and less likely to fall over due to a null pointer. The `FocusSymbols` are clearly identifying the relevant probe functions, and the `EnableConfigs` reinforce which configurations are affected. The patch's reasoning is sound; it correctly identifies the issue as a functional change within the USB probe path, and importantly, it acknowledges that this code path is exposed in virtualized setups (particularly through dummy_hcd). This patch is definitely a positive change and mitigates a potential source of instability, improving the robustness of the system. |
| 14/2 | 2026/08/16 18:34 | tool | set-results |
0mArgs:{
"EnableConfigs": [
"RTW89",
"RTW89_8851BU",
"RTW89_8852AU",
"RTW89_8852BU",
"RTW89_8852CU",
"RTW89_8922AU"
],
"FocusSymbols": [
"rtw8851bu_probe",
"rtw8852au_probe",
"rtw8852bu_probe",
"rtw8852cu_probe",
"rtw8922au_probe",
"rtw89_usb_probe"
],
"Reasoning": "The patch introduces wrapper functions for USB probe in several rtw89 drivers to handle cases where `id-\u003edriver_info` is NULL, preventing a potential null pointer dereference in `rtw89_usb_probe`. This is a functional change in the USB probe path, which is reachable in virtualized environments via dummy_hcd.",
"WorthFuzzing": true
}Results: {
"EnableConfigs": [
"RTW89",
"RTW89_8851BU",
"RTW89_8852AU",
"RTW89_8852BU",
"RTW89_8852CU",
"RTW89_8922AU"
],
"FocusSymbols": [
"rtw8851bu_probe",
"rtw8852au_probe",
"rtw8852bu_probe",
"rtw8852cu_probe",
"rtw8922au_probe",
"rtw89_usb_probe"
],
"Reasoning": "The patch introduces wrapper functions for USB probe in several rtw89 drivers to handle cases where `id-\u003edriver_info` is NULL, preventing a potential null pointer dereference in `rtw89_usb_probe`. This is a functional change in the USB probe path, which is reachable in virtualized environments via dummy_hcd.",
"WorthFuzzing": true
} |
| 15/1 | 2026/08/16 18:34 | action | If |
0mArgs:{
"WorthFuzzing": true
}Results: null |
| 16/2 | 2026/08/16 18:34 | agent | kmsan-evaluator |
0mModel:best-expensive Args: null Results: {
"KMSANReasoning": "The patch fixes a potential NULL pointer dereference that occurs when `id-\u003edriver_info` is 0 (which can happen when a USB device is bound dynamically via sysfs `new_id`). The fix provides a fallback to a static driver info structure. This does not involve uninitialized memory reads or information leaks to userspace. Standard KASAN and kernel oops mechanisms are fully capable of detecting NULL pointer dereferences, so a dedicated KMSAN fuzzing session is not required.",
"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: For your convenience, here is the diff of the changes:
commit 90237a4cbeac80fa695f700d539c3449b2ab153a
Author: syz-cluster <triage@syzkaller.com>
Date: Sun Aug 16 18:33:58 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8851bu.c b/drivers/net/wireless/realtek/rtw89/rtw8851bu.c
index 1e827205f2540..432d216de8746 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8851bu.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8851bu.c
@@ -59,10 +59,23 @@ static const struct usb_device_id rtw_8851bu_id_table[] = {
};
MODULE_DEVICE_TABLE(usb, rtw_8851bu_id_table);
+static int rtw8851bu_probe(struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ const struct rtw89_driver_info *info;
+
+ if (id->driver_info)
+ info = (const struct rtw89_driver_info *)id->driver_info;
+ else
+ info = &rtw89_8851bu_info;
+
+ return rtw89_usb_probe(intf, info);
+}
+
static struct usb_driver rtw_8851bu_driver = {
.name = KBUILD_MODNAME,
.id_table = rtw_8851bu_id_table,
- .probe = rtw89_usb_probe,
+ .probe = rtw8851bu_probe,
.disconnect = rtw89_usb_disconnect,
};
module_usb_driver(rtw_8851bu_driver);
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852au.c b/drivers/net/wireless/realtek/rtw89/rtw8852au.c
index 065f4e5b17afa..a37b60b584f24 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8852au.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8852au.c
@@ -73,10 +73,23 @@ static const struct usb_device_id rtw_8852au_id_table[] = {
};
MODULE_DEVICE_TABLE(usb, rtw_8852au_id_table);
+static int rtw8852au_probe(struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ const struct rtw89_driver_info *info;
+
+ if (id->driver_info)
+ info = (const struct rtw89_driver_info *)id->driver_info;
+ else
+ info = &rtw89_8852au_info;
+
+ return rtw89_usb_probe(intf, info);
+}
+
static struct usb_driver rtw_8852au_driver = {
.name = KBUILD_MODNAME,
.id_table = rtw_8852au_id_table,
- .probe = rtw89_usb_probe,
+ .probe = rtw8852au_probe,
.disconnect = rtw89_usb_disconnect,
};
module_usb_driver(rtw_8852au_driver);
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852bu.c b/drivers/net/wireless/realtek/rtw89/rtw8852bu.c
index de79a19a2824d..81b6156a8d27e 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8852bu.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8852bu.c
@@ -73,10 +73,23 @@ static const struct usb_device_id rtw_8852bu_id_table[] = {
};
MODULE_DEVICE_TABLE(usb, rtw_8852bu_id_table);
+static int rtw8852bu_probe(struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ const struct rtw89_driver_info *info;
+
+ if (id->driver_info)
+ info = (const struct rtw89_driver_info *)id->driver_info;
+ else
+ info = &rtw89_8852bu_info;
+
+ return rtw89_usb_probe(intf, info);
+}
+
static struct usb_driver rtw_8852bu_driver = {
.name = KBUILD_MODNAME,
.id_table = rtw_8852bu_id_table,
- .probe = rtw89_usb_probe,
+ .probe = rtw8852bu_probe,
.disconnect = rtw89_usb_disconnect,
};
module_usb_driver(rtw_8852bu_driver);
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852cu.c b/drivers/net/wireless/realtek/rtw89/rtw8852cu.c
index 2dec9b8454815..067c6bb007b31 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8852cu.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8852cu.c
@@ -133,10 +133,23 @@ static const struct usb_device_id rtw_8852cu_id_table[] = {
};
MODULE_DEVICE_TABLE(usb, rtw_8852cu_id_table);
+static int rtw8852cu_probe(struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ const struct rtw89_driver_info *info;
+
+ if (id->driver_info)
+ info = (const struct rtw89_driver_info *)id->driver_info;
+ else
+ info = &rtw89_8852cu_info;
+
+ return rtw89_usb_probe(intf, info);
+}
+
static struct usb_driver rtw_8852cu_driver = {
.name = KBUILD_MODNAME,
.id_table = rtw_8852cu_id_table,
- .probe = rtw89_usb_probe,
+ .probe = rtw8852cu_probe,
.disconnect = rtw89_usb_disconnect,
};
module_usb_driver(rtw_8852cu_driver);
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8922au.c b/drivers/net/wireless/realtek/rtw89/rtw8922au.c
index 56c79b1ec865f..2f60021704e08 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8922au.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8922au.c
@@ -74,10 +74,23 @@ static const struct usb_device_id rtw_8922au_id_table[] = {
};
MODULE_DEVICE_TABLE(usb, rtw_8922au_id_table);
+static int rtw8922au_probe(struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ const struct rtw89_driver_info *info;
+
+ if (id->driver_info)
+ info = (const struct rtw89_driver_info *)id->driver_info;
+ else
+ info = &rtw89_8922au_info;
+
+ return rtw89_usb_probe(intf, info);
+}
+
static struct usb_driver rtw_8922au_driver = {
.name = KBUILD_MODNAME,
.id_table = rtw_8922au_id_table,
- .probe = rtw89_usb_probe,
+ .probe = rtw8922au_probe,
.disconnect = rtw89_usb_disconnect,
};
module_usb_driver(rtw_8922au_driver);
diff --git a/drivers/net/wireless/realtek/rtw89/usb.c b/drivers/net/wireless/realtek/rtw89/usb.c
index aafa8b9e93dfc..1d7c74557ab13 100644
--- a/drivers/net/wireless/realtek/rtw89/usb.c
+++ b/drivers/net/wireless/realtek/rtw89/usb.c
@@ -1201,15 +1201,12 @@ static const struct attribute_group rtw89_usb_group = {
__ATTRIBUTE_GROUPS(rtw89_usb);
int rtw89_usb_probe(struct usb_interface *intf,
- const struct usb_device_id *id)
+ const struct rtw89_driver_info *info)
{
- const struct rtw89_driver_info *info;
struct rtw89_dev *rtwdev;
struct rtw89_usb *rtwusb;
int ret;
- info = (const struct rtw89_driver_info *)id->driver_info;
-
rtwdev = rtw89_alloc_ieee80211_hw(&intf->dev,
sizeof(struct rtw89_usb), info);
if (!rtwdev) {
diff --git a/drivers/net/wireless/realtek/rtw89/usb.h b/drivers/net/wireless/realtek/rtw89/usb.h
index bdf3125597438..372620d0851e6 100644
--- a/drivers/net/wireless/realtek/rtw89/usb.h
+++ b/drivers/net/wireless/realtek/rtw89/usb.h
@@ -95,7 +95,7 @@ static inline struct rtw89_usb *rtw89_usb_priv(struct rtw89_dev *rtwdev)
}
int rtw89_usb_probe(struct usb_interface *intf,
- const struct usb_device_id *id);
+ const struct rtw89_driver_info *info);
void rtw89_usb_disconnect(struct usb_interface *intf);
#endif
|
| 17/3 | 2026/08/16 18:34 | llm | kmsan-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 4679 output: 124 thoughts: 679 Thoughts: **Analyzing the Realtek Wireless Driver Patch** Okay, let me break down this Realtek wireless driver patch. It's targeting the probe functions within several `rtw89` family drivers: `rtw8851bu`, `rtw8852au`, `rtw8852bu`, `rtw8852cu`, and `rtw8922au`. The core change is in how the USB probe function, `rtw89_usb_probe`, handles driver-specific information. Instead of directly using a `usb_device_id`'s `driver_info` field, which, critically, is a `kernel_ulong_t` and therefore can be zero, it now takes a `const struct rtw89_driver_info *info` directly. The individual driver files now have a new probe function, like `rtw8851bu_probe`, which checks if the `id->driver_info` pointer is valid. If it *is* set (non-NULL, after the cast), it uses it. If it's *not* set, i.e., is zero, it falls back to a default `rtw89_8851bu_info` struct. This is the crucial part. The initial problem here is crystal clear: the code was dereferencing `id->driver_info` which could be zero. Specifically, the original code had: ```c - info = (const struct rtw89_driver_info *)id->driver_info; ``` This presents a classic NULL pointer dereference bug. If the USB device was bound through, say, sysfs's `new_id` mechanism, then the `driver_info` field could be 0, and the assignment would have `info` as NULL, which is then passed down to `rtw89_alloc_ieee80211_hw`, and boom, you crash. Now, the question is, is this an uninitialized memory issue? No, absolutely not. The root cause is a NULL pointer dereference. The `driver_info` field isn't "uninitialized" in the traditional sense. It's initialized to zero. The problem is dereferencing a zero value. This patch cleverly provides a fallback, preventing the crash. KASAN or a standard kernel oops would quickly catch a NULL pointer dereference like this. There's no uninitialized memory being read or leaked to userspace here. Let's quickly re-iterate: The fix adds a fallback to a static struct `&rtw89_8851bu_info` when `id->driver_info` is 0. This is a very common fix for USB drivers that assume `driver_info` is always a valid pointer. This is all about preventing crashes in USB drivers when dealing with dynamically bound devices through `new_id`. Therefore, the `NeedsKMSAN` flag is `false`. This patch clearly resolves a NULL pointer dereference issue, specifically when `driver_info` is 0 (as often happens with `new_id`), and is not related to uninitialized memory. The standard kernel safety mechanisms (KASAN, Oops) are fully sufficient for detecting and mitigating NULL pointer dereferences. |
| 18/3 | 2026/08/16 18:34 | tool | set-results |
0mArgs:{
"KMSANReasoning": "The patch fixes a potential NULL pointer dereference that occurs when `id-\u003edriver_info` is 0 (which can happen when a USB device is bound dynamically via sysfs `new_id`). The fix provides a fallback to a static driver info structure. This does not involve uninitialized memory reads or information leaks to userspace. Standard KASAN and kernel oops mechanisms are fully capable of detecting NULL pointer dereferences, so a dedicated KMSAN fuzzing session is not required.",
"NeedsKMSAN": false
}Results: {
"KMSANReasoning": "The patch fixes a potential NULL pointer dereference that occurs when `id-\u003edriver_info` is 0 (which can happen when a USB device is bound dynamically via sysfs `new_id`). The fix provides a fallback to a static driver info structure. This does not involve uninitialized memory reads or information leaks to userspace. Standard KASAN and kernel oops mechanisms are fully capable of detecting NULL pointer dereferences, so a dedicated KMSAN fuzzing session is not required.",
"NeedsKMSAN": false
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|