| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/08/19 20:22 | flow | patch-triage |
0mArgs:null Results: {
"EnableConfigs": [
"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 in the rtw89 USB driver probe path. When a USB device is bound dynamically via sysfs (e.g., using `new_id`), the `id-\u003edriver_info` field can be NULL. The patch introduces a `default_info` fallback to ensure the driver info structure is always valid. This prevents a NULL pointer dereference, which is already caught by standard kernel debugging tools and KASAN. The patch does not introduce or expose any uninitialized memory risks or info-leaks, so a dedicated KMSAN fuzzing session is not necessary.",
"NeedsKMSAN": false,
"Reasoning": "The patch modifies the USB probe functions for multiple Realtek rtw89 wireless drivers to handle cases where the USB device ID driver_info is NULL (e.g., when probed via sysfs new_id). This is a functional change in the driver initialization path that is reachable in virtualized environments via USB emulation.",
"WorthFuzzing": true
} |
| 1/1 | 2026/08/19 20:22 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 6c7e82f882498195816b8828c58ed25ffa50707c\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Wed Aug 19 20:22:05 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..6672ebe68f172 100644\n--- a/drivers/net/wireless/realtek/rtw89/rtw8851bu.c\n+++ b/drivers/net/wireless/realtek/rtw89/rtw8851bu.c\n@@ -59,10 +59,16 @@ 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+\treturn rtw89_usb_probe(intf, id, \u0026rtw89_8851bu_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..1a2e5dfbaab3c 100644\n--- a/drivers/net/wireless/realtek/rtw89/rtw8852au.c\n+++ b/drivers/net/wireless/realtek/rtw89/rtw8852au.c\n@@ -73,10 +73,16 @@ 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+\treturn rtw89_usb_probe(intf, id, \u0026rtw89_8852au_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..550fc4ac7a21f 100644\n--- a/drivers/net/wireless/realtek/rtw89/rtw8852bu.c\n+++ b/drivers/net/wireless/realtek/rtw89/rtw8852bu.c\n@@ -73,10 +73,16 @@ 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+\treturn rtw89_usb_probe(intf, id, \u0026rtw89_8852bu_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..6f852f4a713e1 100644\n--- a/drivers/net/wireless/realtek/rtw89/rtw8852cu.c\n+++ b/drivers/net/wireless/realtek/rtw89/rtw8852cu.c\n@@ -133,10 +133,16 @@ 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+\treturn rtw89_usb_probe(intf, id, \u0026rtw89_8852cu_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..2cd2b76d19acf 100644\n--- a/drivers/net/wireless/realtek/rtw89/rtw8922au.c\n+++ b/drivers/net/wireless/realtek/rtw89/rtw8922au.c\n@@ -74,10 +74,16 @@ 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+\treturn rtw89_usb_probe(intf, id, \u0026rtw89_8922au_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..dbad42c17761e 100644\n--- a/drivers/net/wireless/realtek/rtw89/usb.c\n+++ b/drivers/net/wireless/realtek/rtw89/usb.c\n@@ -1201,7 +1201,8 @@ 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 usb_device_id *id,\n+\t\t const struct rtw89_driver_info *default_info)\n {\n \tconst struct rtw89_driver_info *info;\n \tstruct rtw89_dev *rtwdev;\n@@ -1209,6 +1210,8 @@ int rtw89_usb_probe(struct usb_interface *intf,\n \tint ret;\n \n \tinfo = (const struct rtw89_driver_info *)id-\u003edriver_info;\n+\tif (!info)\n+\t\tinfo = default_info;\n \n \trtwdev = rtw89_alloc_ieee80211_hw(\u0026intf-\u003edev,\n \t\t\t\t\t sizeof(struct rtw89_usb), info);\ndiff --git a/drivers/net/wireless/realtek/rtw89/usb.h b/drivers/net/wireless/realtek/rtw89/usb.h\nindex bdf3125597438..d2af29d068f19 100644\n--- a/drivers/net/wireless/realtek/rtw89/usb.h\n+++ b/drivers/net/wireless/realtek/rtw89/usb.h\n@@ -95,7 +95,8 @@ 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 usb_device_id *id,\n+\t\t const struct rtw89_driver_info *default_info);\n void rtw89_usb_disconnect(struct usb_interface *intf);\n \n #endif\n"
} |
| 2/1 | 2026/08/19 20:22 | agent | patch-evaluator |
0mModel:best-expensive Args: null Results: {
"EnableConfigs": [
"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 modifies the USB probe functions for multiple Realtek rtw89 wireless drivers to handle cases where the USB device ID driver_info is NULL (e.g., when probed via sysfs new_id). This is a functional change in the driver initialization path that is reachable in virtualized environments via USB emulation.",
"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 6c7e82f882498195816b8828c58ed25ffa50707c
Author: syz-cluster <triage@syzkaller.com>
Date: Wed Aug 19 20:22:05 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..6672ebe68f172 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8851bu.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8851bu.c
@@ -59,10 +59,16 @@ 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)
+{
+ return rtw89_usb_probe(intf, id, &rtw89_8851bu_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..1a2e5dfbaab3c 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8852au.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8852au.c
@@ -73,10 +73,16 @@ 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)
+{
+ return rtw89_usb_probe(intf, id, &rtw89_8852au_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..550fc4ac7a21f 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8852bu.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8852bu.c
@@ -73,10 +73,16 @@ 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)
+{
+ return rtw89_usb_probe(intf, id, &rtw89_8852bu_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..6f852f4a713e1 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8852cu.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8852cu.c
@@ -133,10 +133,16 @@ 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)
+{
+ return rtw89_usb_probe(intf, id, &rtw89_8852cu_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..2cd2b76d19acf 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8922au.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8922au.c
@@ -74,10 +74,16 @@ 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)
+{
+ return rtw89_usb_probe(intf, id, &rtw89_8922au_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..dbad42c17761e 100644
--- a/drivers/net/wireless/realtek/rtw89/usb.c
+++ b/drivers/net/wireless/realtek/rtw89/usb.c
@@ -1201,7 +1201,8 @@ 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 usb_device_id *id,
+ const struct rtw89_driver_info *default_info)
{
const struct rtw89_driver_info *info;
struct rtw89_dev *rtwdev;
@@ -1209,6 +1210,8 @@ int rtw89_usb_probe(struct usb_interface *intf,
int ret;
info = (const struct rtw89_driver_info *)id->driver_info;
+ if (!info)
+ info = default_info;
rtwdev = rtw89_alloc_ieee80211_hw(&intf->dev,
sizeof(struct rtw89_usb), info);
diff --git a/drivers/net/wireless/realtek/rtw89/usb.h b/drivers/net/wireless/realtek/rtw89/usb.h
index bdf3125597438..d2af29d068f19 100644
--- a/drivers/net/wireless/realtek/rtw89/usb.h
+++ b/drivers/net/wireless/realtek/rtw89/usb.h
@@ -95,7 +95,8 @@ 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 usb_device_id *id,
+ const struct rtw89_driver_info *default_info);
void rtw89_usb_disconnect(struct usb_interface *intf);
#endif
|
| 3/2 | 2026/08/19 20:22 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 4414 output: 41 thoughts: 368 Thoughts: **Analyzing a Realtek Wireless Driver Patch** Okay, so I'm looking at this patch for the `rtw89` wireless driver, specifically dealing with Realtek USB devices. It looks like they've refactored the probe function, `rtw89_usb_probe`. Before, it was directly used as the probe callback in the `usb_driver` structure. Now, they've added driver-specific probe functions, like `rtw8851bu_probe`, that *then* call `rtw89_usb_probe` and pass in a default `rtw89_driver_info` struct. Essentially, they're handling cases where the `id->driver_info` might be `NULL`. This can happen with things like sysfs `new_id` probing, or other mechanisms that don't set this field correctly. It's a sensible fix, cleaning up potential null pointer dereferences, I get it. Now, the important question – is this patch worth fuzzing? Let's see... The change is in the `.probe` function of a USB driver, which means it should be reachable using the standard USB fuzzing techniques, like the dummy HCD or syzkaller. Probe functions are always good targets. Assuming I've got a decent virtualized environment with USB emulation, this should be an achievable target. The added functions like `rtw8851bu_probe` and the modified `rtw89_usb_probe` are the specific parts I'd be looking at. Alright, time to crack open the Kconfig and figure out which configurations I need to enable to get these drivers built. I need to make sure I'm fully enabling the relevant `rtw89` configurations. |
| 4/2 | 2026/08/19 20:22 | 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/19 20:22 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 7852 output: 43 thoughts: 151 Thoughts: **Analyzing RTW89 USB Driver Configurations** Okay, so I'm looking at these configurations: RTW89_8851BU, RTW89_8852AU, RTW89_8852BU, RTW89_8852CU, and RTW89_8922AU. Immediately, I recognize these as USB drivers. That's good, simplifies things a bit. I see the associated probe functions: `rtw8851bu_probe`, `rtw8852au_probe`, `rtw8852bu_probe`, `rtw8852cu_probe`, and `rtw8922au_probe`. And I also see a `rtw89_usb_probe` function. Now, my immediate thought is to check for any dependencies related to the RTW89 core. Before I dive deeper into the specifics of each probe function, I need to understand if RTW89 relies on any common modules or infrastructure. This will dictate how I approach understanding the interconnections and overall architecture of the RTW89 USB drivers. |
| 6/2 | 2026/08/19 20:22 | tool | grepper |
0mArgs:{
"Expression": "depends on.*RTW89",
"PathPrefix": "drivers/net/wireless/realtek/rtw89/Kconfig"
}Results: {
"Output": "drivers/net/wireless/realtek/rtw89/Kconfig=190=config RTW89_DEBUGMSG\ndrivers/net/wireless/realtek/rtw89/Kconfig-191-\tbool \"Realtek rtw89 debug message support\"\ndrivers/net/wireless/realtek/rtw89/Kconfig:192:\tdepends on RTW89_CORE\ndrivers/net/wireless/realtek/rtw89/Kconfig-193-\tselect RTW89_DEBUG\n--\ndrivers/net/wireless/realtek/rtw89/Kconfig=199=config RTW89_DEBUGFS\ndrivers/net/wireless/realtek/rtw89/Kconfig-200-\tbool \"Realtek rtw89 debugfs support\"\ndrivers/net/wireless/realtek/rtw89/Kconfig:201:\tdepends on RTW89_CORE \u0026\u0026 CFG80211_DEBUGFS\ndrivers/net/wireless/realtek/rtw89/Kconfig-202-\tselect RTW89_DEBUG\n--\ndrivers/net/wireless/realtek/rtw89/Kconfig=208=config RTW89_LEDS\ndrivers/net/wireless/realtek/rtw89/Kconfig-209-\tbool\ndrivers/net/wireless/realtek/rtw89/Kconfig:210:\tdepends on RTW89_CORE\ndrivers/net/wireless/realtek/rtw89/Kconfig-211-\tdepends on LEDS_CLASS=y || LEDS_CLASS=MAC80211\n--\ndrivers/net/wireless/realtek/rtw89/Kconfig=215=config RTW89_LEDS_MC\ndrivers/net/wireless/realtek/rtw89/Kconfig-216-\tbool\ndrivers/net/wireless/realtek/rtw89/Kconfig:217:\tdepends on RTW89_LEDS\ndrivers/net/wireless/realtek/rtw89/Kconfig-218-\tdepends on LEDS_CLASS_MULTICOLOR\n"
} |
| 7/2 | 2026/08/19 20:22 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 8825 output: 47 thoughts: 18 Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience: **Dependency Deep Dive: RTW89_8851BU** Okay, time to get my hands dirty with RTW89_8851BU. First things first, let's nail down those dependencies. I need to understand everything that this module relies on, down to the firmware level, and also any relationships it has with other parts of the system. We're talking about everything from the kernel drivers and any associated HALs, up to any user-space applications that interface with it. I need to be sure this build or the system as a whole doesn't break due to a bad package dependency. I want to look for both direct and transitive dependencies; I cannot take anything for granted. Are there any known conflicts? Are we pulling in the right versions of those dependencies? Are we missing any? I'm thinking about build-time dependencies, runtime dependencies, and of course, those crucial module-specific dependencies within the firmware image itself. Any potential security implications need to be evaluated during this check, as well. I should also consider the build environment. What tools are used for building RTW89_8851BU? How are the dependencies managed during the build process? I'll probably start with the module's makefile or build system configuration, trace it back from there, and map all of these interactions out in my head. No stone unturned. |
| 8/2 | 2026/08/19 20:22 | 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"
} |
| 9/2 | 2026/08/19 20:22 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 9345 output: 43 thoughts: 12 Thoughts: Okay, let's dive into this. Here's my take on those instructions, as if they're my internal thought process: **Diving into the Code (Specifically Around Line 58)** Alright, so I'm being told to focus on a specific area within the file, namely around line 58. My first thought is, why that particular line? Is there something significant happening there? Is it a potential starting point for debugging, a crucial calculation, or perhaps the implementation of a specific algorithm? My years of experience tell me line numbers often act as indicators. Someone's drawn my attention there, so I need to understand the *why* behind that directive. I'll approach it with a level of focused scrutiny. Let's see what that section of the code reveals. I need to understand the context. Maybe it has to do with an issue, some data that I was looking at... I'll keep an open mind and prepare to trace the logic. Line 58, here I come! |
| 10/2 | 2026/08/19 20:22 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/realtek/rtw89/Kconfig",
"FirstLine": 50,
"LineCount": 50
}Results: {
"Contents": " 50:\t\tselect RTW89_CORE\n 51:\t\tselect RTW89_PCI\n 52:\t\tselect RTW89_8851B\n 53:\t\thelp\n 54:\t\t Select this option will enable support for 8851BE chipset\n 55:\t\n 56:\t\t 802.11ax PCIe wireless network (Wi-Fi 6) adapter\n 57:\t\n 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"
} |
| 11/2 | 2026/08/19 20:22 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 10373 output: 230 thoughts: 184 Thoughts: **My Analysis of the Driver Probe Path Fix** Okay, so I'm looking at these configurations: RTW89_8851BU, RTW89_8852AU, RTW89_8852BU, RTW89_8852CU, RTW89_8922AU, RTW89_USB, and RTW89_CORE. I'm going to make sure to include those in my assessment. The key functions here are the `rtw*probe` functions – specifically `rtw8851bu_probe`, `rtw8852au_probe`, `rtw8852bu_probe`, `rtw8852cu_probe`, `rtw8922au_probe`, and `rtw89_usb_probe`. Those are the entry points I need to scrutinize. This looks like a functional change – a potential fix for a fairly nasty bug in the driver probe path where `id->driver_info` might be null. Any time you're touching probe code, it's worth a deep dive, and fixing a `NULL` pointer dereference is especially critical. This screams "vulnerable!" to me. This needs some serious fuzzing to make sure this fix is actually correct and doesn't introduce any new issues or expose the system to vulnerabilities. |
| 12/2 | 2026/08/19 20:22 | tool | set-results |
0mArgs:{
"EnableConfigs": [
"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 modifies the USB probe functions for multiple Realtek rtw89 wireless drivers to handle cases where the USB device ID driver_info is NULL (e.g., when probed via sysfs new_id). This is a functional change in the driver initialization path that is reachable in virtualized environments via USB emulation.",
"WorthFuzzing": true
}Results: {
"EnableConfigs": [
"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 modifies the USB probe functions for multiple Realtek rtw89 wireless drivers to handle cases where the USB device ID driver_info is NULL (e.g., when probed via sysfs new_id). This is a functional change in the driver initialization path that is reachable in virtualized environments via USB emulation.",
"WorthFuzzing": true
} |
| 13/1 | 2026/08/19 20:22 | action | If |
0mArgs:{
"WorthFuzzing": true
}Results: null |
| 14/2 | 2026/08/19 20:22 | agent | kmsan-evaluator |
0mModel:best-expensive Args: null Results: {
"KMSANReasoning": "The patch fixes a potential NULL pointer dereference in the rtw89 USB driver probe path. When a USB device is bound dynamically via sysfs (e.g., using `new_id`), the `id-\u003edriver_info` field can be NULL. The patch introduces a `default_info` fallback to ensure the driver info structure is always valid. This prevents a NULL pointer dereference, which is already caught by standard kernel debugging tools and KASAN. The patch does not introduce or expose any uninitialized memory risks or info-leaks, so a dedicated KMSAN fuzzing session is not necessary.",
"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 6c7e82f882498195816b8828c58ed25ffa50707c
Author: syz-cluster <triage@syzkaller.com>
Date: Wed Aug 19 20:22:05 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..6672ebe68f172 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8851bu.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8851bu.c
@@ -59,10 +59,16 @@ 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)
+{
+ return rtw89_usb_probe(intf, id, &rtw89_8851bu_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..1a2e5dfbaab3c 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8852au.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8852au.c
@@ -73,10 +73,16 @@ 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)
+{
+ return rtw89_usb_probe(intf, id, &rtw89_8852au_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..550fc4ac7a21f 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8852bu.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8852bu.c
@@ -73,10 +73,16 @@ 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)
+{
+ return rtw89_usb_probe(intf, id, &rtw89_8852bu_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..6f852f4a713e1 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8852cu.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8852cu.c
@@ -133,10 +133,16 @@ 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)
+{
+ return rtw89_usb_probe(intf, id, &rtw89_8852cu_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..2cd2b76d19acf 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8922au.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8922au.c
@@ -74,10 +74,16 @@ 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)
+{
+ return rtw89_usb_probe(intf, id, &rtw89_8922au_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..dbad42c17761e 100644
--- a/drivers/net/wireless/realtek/rtw89/usb.c
+++ b/drivers/net/wireless/realtek/rtw89/usb.c
@@ -1201,7 +1201,8 @@ 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 usb_device_id *id,
+ const struct rtw89_driver_info *default_info)
{
const struct rtw89_driver_info *info;
struct rtw89_dev *rtwdev;
@@ -1209,6 +1210,8 @@ int rtw89_usb_probe(struct usb_interface *intf,
int ret;
info = (const struct rtw89_driver_info *)id->driver_info;
+ if (!info)
+ info = default_info;
rtwdev = rtw89_alloc_ieee80211_hw(&intf->dev,
sizeof(struct rtw89_usb), info);
diff --git a/drivers/net/wireless/realtek/rtw89/usb.h b/drivers/net/wireless/realtek/rtw89/usb.h
index bdf3125597438..d2af29d068f19 100644
--- a/drivers/net/wireless/realtek/rtw89/usb.h
+++ b/drivers/net/wireless/realtek/rtw89/usb.h
@@ -95,7 +95,8 @@ 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 usb_device_id *id,
+ const struct rtw89_driver_info *default_info);
void rtw89_usb_disconnect(struct usb_interface *intf);
#endif
|
| 15/3 | 2026/08/19 20:22 | llm | kmsan-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 4411 output: 152 thoughts: 389 Thoughts: **My Analysis of this Realtek Wireless Driver Patch** Okay, so this patch is aimed squarely at the `rtw89` wireless driver for Realtek USB devices. I see that they're modifying `rtw89_usb_probe` to accept a `default_info` argument. That's immediately interesting. Looking deeper, it seems they're adding wrapper functions, like `rtw8851bu_probe`, in the individual device driver files. These wrappers then call the updated `rtw89_usb_probe`, passing the device-specific information struct (`&rtw89_8851bu_info` in the example). Ah, I get it. This is probably to handle a situation where `id->driver_info` might be NULL or isn't populated correctly. This can happen, especially with dynamic USB ID binding through sysfs `new_id`. In these scenarios, `driver_info` isn't always provided. If it's NULL, the code would be dereferencing a null pointer when it tries to use that `info` pointer later on in the process, likely in `rtw89_alloc_ieee80211_hw` or somewhere similar. A classic NULL pointer dereference situation! This patch provides a default `info` structure, ensuring that the driver *always* has valid data to work with, even if the device isn't properly identified initially. That prevents the crash. I quickly scanned the code changes and confirm: the core of the fix is that standard check: ```c info = (const struct rtw89_driver_info *)id->driver_info; + if (!info) + info = default_info; ``` That's it. It's a clean, straightforward fix for a common USB driver issue. No uninitialized memory usage, no information leaks, or anything that would warrant the use of KMSAN. So, I will mark this as `NeedsKMSAN=false`. It's a solid, necessary, and well-targeted fix. |
| 16/3 | 2026/08/19 20:23 | tool | set-results |
0mArgs:{
"KMSANReasoning": "The patch fixes a potential NULL pointer dereference in the rtw89 USB driver probe path. When a USB device is bound dynamically via sysfs (e.g., using `new_id`), the `id-\u003edriver_info` field can be NULL. The patch introduces a `default_info` fallback to ensure the driver info structure is always valid. This prevents a NULL pointer dereference, which is already caught by standard kernel debugging tools and KASAN. The patch does not introduce or expose any uninitialized memory risks or info-leaks, so a dedicated KMSAN fuzzing session is not necessary.",
"NeedsKMSAN": false
}Results: {
"KMSANReasoning": "The patch fixes a potential NULL pointer dereference in the rtw89 USB driver probe path. When a USB device is bound dynamically via sysfs (e.g., using `new_id`), the `id-\u003edriver_info` field can be NULL. The patch introduces a `default_info` fallback to ensure the driver info structure is always valid. This prevents a NULL pointer dereference, which is already caught by standard kernel debugging tools and KASAN. The patch does not introduce or expose any uninitialized memory risks or info-leaks, so a dedicated KMSAN fuzzing session is not necessary.",
"NeedsKMSAN": false
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|