| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/06/30 04:43 | flow | patch-triage |
0mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [
"reqsk_timer_handler",
"tcp_fastopen_synack_timer"
],
"Reasoning": "The patch modifies TCP SYN-ACK retransmission timeout logic to prevent shift-out-of-bounds and limits the maximum number of SYN-ACK retries. This is a functional change in the core TCP stack.",
"WorthFuzzing": true
} |
| 1/1 | 2026/06/30 04:43 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 4d57185ba3efd7d38d78a9bac62f74f1ab1bd9ac\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Tue Jun 30 04:43:18 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/include/net/tcp.h b/include/net/tcp.h\nindex 6d376ea4d1c01d..656f1bd0fa1ae1 100644\n--- a/include/net/tcp.h\n+++ b/include/net/tcp.h\n@@ -183,6 +183,7 @@ static_assert((1 \u003c\u003c ATO_BITS) \u003e TCP_DELACK_MAX);\n #define MAX_TCP_KEEPINTVL\t32767\n #define MAX_TCP_KEEPCNT\t\t127\n #define MAX_TCP_SYNCNT\t\t127\n+#define MAX_TCP_SYNACK_RETRIES\t63\n \n /* Ensure that TCP PAWS checks are relaxed after ~2147 seconds\n * to avoid overflows. This assumes a clock smaller than 1 Mhz.\n@@ -882,12 +883,22 @@ static inline u32 __tcp_set_rto(const struct tcp_sock *tp)\n \treturn usecs_to_jiffies((tp-\u003esrtt_us \u003e\u003e 3) + tp-\u003erttvar_us);\n }\n \n-static inline unsigned long tcp_reqsk_timeout(struct request_sock *req)\n+static inline unsigned long tcp_reqsk_timeout_sk(const struct sock *sk,\n+\t\t\t\t\t\t struct request_sock *req)\n {\n-\tu64 timeout = (u64)req-\u003etimeout \u003c\u003c req-\u003enum_timeout;\n+\tu64 timeout = req-\u003etimeout;\n+\tu32 rto_max = tcp_rto_max(sk);\n+\n+\tif (req-\u003enum_timeout \u003e= BITS_PER_TYPE(u64) ||\n+\t timeout \u003e U64_MAX \u003e\u003e req-\u003enum_timeout)\n+\t\treturn rto_max;\n+\n+\treturn (unsigned long)min_t(u64, timeout \u003c\u003c req-\u003enum_timeout, rto_max);\n+}\n \n-\treturn (unsigned long)min_t(u64, timeout,\n-\t\t\t\t tcp_rto_max(req-\u003ersk_listener));\n+static inline unsigned long tcp_reqsk_timeout(struct request_sock *req)\n+{\n+\treturn tcp_reqsk_timeout_sk(req-\u003ersk_listener, req);\n }\n \n u32 tcp_delack_max(const struct sock *sk);\ndiff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c\nindex 56902bba54838b..b74212bae3dd25 100644\n--- a/net/ipv4/inet_connection_sock.c\n+++ b/net/ipv4/inet_connection_sock.c\n@@ -1056,6 +1056,8 @@ static void reqsk_timer_handler(struct timer_list *t)\n \tnet = sock_net(sk_listener);\n \tmax_syn_ack_retries = READ_ONCE(icsk-\u003eicsk_syn_retries) ? :\n \t\tREAD_ONCE(net-\u003eipv4.sysctl_tcp_synack_retries);\n+\tmax_syn_ack_retries = min_t(int, max_syn_ack_retries,\n+\t\t\t\t MAX_TCP_SYNACK_RETRIES);\n \t/* Normally all the openreqs are young and become mature\n \t * (i.e. converted to established socket) for first timeout.\n \t * If synack was not acknowledged for 1 second, it means\n@@ -1086,7 +1088,9 @@ static void reqsk_timer_handler(struct timer_list *t)\n \t\t}\n \t}\n \n-\tsyn_ack_recalc(req, max_syn_ack_retries, READ_ONCE(queue-\u003erskq_defer_accept),\n+\tsyn_ack_recalc(req, max_syn_ack_retries,\n+\t\t min_t(u8, READ_ONCE(queue-\u003erskq_defer_accept),\n+\t\t\t MAX_TCP_SYNACK_RETRIES),\n \t\t \u0026expire, \u0026resend);\n \ttcp_syn_ack_timeout(req);\n \ndiff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c\nindex ca1180dba1dea9..f9d233b98bbc6c 100644\n--- a/net/ipv4/sysctl_net_ipv4.c\n+++ b/net/ipv4/sysctl_net_ipv4.c\n@@ -35,6 +35,7 @@ static int ip_ttl_min = 1;\n static int ip_ttl_max = 255;\n static int tcp_syn_retries_min = 1;\n static int tcp_syn_retries_max = MAX_TCP_SYNCNT;\n+static int tcp_synack_retries_max = MAX_TCP_SYNACK_RETRIES;\n static int tcp_syn_linear_timeouts_max = MAX_TCP_SYNCNT;\n static unsigned long ip_ping_group_range_min[] = { 0, 0 };\n static unsigned long ip_ping_group_range_max[] = { GID_T_MAX, GID_T_MAX };\n@@ -1034,6 +1035,7 @@ static struct ctl_table ipv4_net_table[] = {\n \t\t.maxlen\t\t= sizeof(u8),\n \t\t.mode\t\t= 0644,\n \t\t.proc_handler\t= proc_dou8vec_minmax,\n+\t\t.extra2\t\t= \u0026tcp_synack_retries_max\n \t},\n #ifdef CONFIG_SYN_COOKIES\n \t{\ndiff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c\nindex bf171b5e1eb306..bbedf2b9e1bcea 100644\n--- a/net/ipv4/tcp_timer.c\n+++ b/net/ipv4/tcp_timer.c\n@@ -467,6 +467,7 @@ static void tcp_fastopen_synack_timer(struct sock *sk, struct request_sock *req)\n \t */\n \tmax_retries = READ_ONCE(icsk-\u003eicsk_syn_retries) ? :\n \t\tREAD_ONCE(sock_net(sk)-\u003eipv4.sysctl_tcp_synack_retries) + 1;\n+\tmax_retries = min_t(int, max_retries, MAX_TCP_SYNACK_RETRIES);\n \n \tif (req-\u003enum_timeout \u003e= max_retries) {\n \t\ttcp_write_err(sk);\n@@ -488,7 +489,7 @@ static void tcp_fastopen_synack_timer(struct sock *sk, struct request_sock *req)\n \tif (!tp-\u003eretrans_stamp)\n \t\ttp-\u003eretrans_stamp = tcp_time_stamp_ts(tp);\n \ttcp_reset_xmit_timer(sk, ICSK_TIME_RETRANS,\n-\t\t\t req-\u003etimeout \u003c\u003c req-\u003enum_timeout, false);\n+\t\t\t tcp_reqsk_timeout_sk(sk, req), false);\n }\n \n static bool tcp_rtx_probe0_timed_out(const struct sock *sk,\n"
} |
| 2/1 | 2026/06/30 04:43 | agent | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [
"reqsk_timer_handler",
"tcp_fastopen_synack_timer"
],
"Reasoning": "The patch modifies TCP SYN-ACK retransmission timeout logic to prevent shift-out-of-bounds and limits the maximum number of SYN-ACK retries. This is a functional change in the core TCP stack.",
"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). 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. 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. Do not list too generic configs (we already have them enabled). Only list those that specifically cover the modified code. 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 4d57185ba3efd7d38d78a9bac62f74f1ab1bd9ac
Author: syz-cluster <triage@syzkaller.com>
Date: Tue Jun 30 04:43:18 2026 +0000
syz-cluster: applied patch under review
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 6d376ea4d1c01d..656f1bd0fa1ae1 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -183,6 +183,7 @@ static_assert((1 << ATO_BITS) > TCP_DELACK_MAX);
#define MAX_TCP_KEEPINTVL 32767
#define MAX_TCP_KEEPCNT 127
#define MAX_TCP_SYNCNT 127
+#define MAX_TCP_SYNACK_RETRIES 63
/* Ensure that TCP PAWS checks are relaxed after ~2147 seconds
* to avoid overflows. This assumes a clock smaller than 1 Mhz.
@@ -882,12 +883,22 @@ static inline u32 __tcp_set_rto(const struct tcp_sock *tp)
return usecs_to_jiffies((tp->srtt_us >> 3) + tp->rttvar_us);
}
-static inline unsigned long tcp_reqsk_timeout(struct request_sock *req)
+static inline unsigned long tcp_reqsk_timeout_sk(const struct sock *sk,
+ struct request_sock *req)
{
- u64 timeout = (u64)req->timeout << req->num_timeout;
+ u64 timeout = req->timeout;
+ u32 rto_max = tcp_rto_max(sk);
+
+ if (req->num_timeout >= BITS_PER_TYPE(u64) ||
+ timeout > U64_MAX >> req->num_timeout)
+ return rto_max;
+
+ return (unsigned long)min_t(u64, timeout << req->num_timeout, rto_max);
+}
- return (unsigned long)min_t(u64, timeout,
- tcp_rto_max(req->rsk_listener));
+static inline unsigned long tcp_reqsk_timeout(struct request_sock *req)
+{
+ return tcp_reqsk_timeout_sk(req->rsk_listener, req);
}
u32 tcp_delack_max(const struct sock *sk);
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index 56902bba54838b..b74212bae3dd25 100644
--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -1056,6 +1056,8 @@ static void reqsk_timer_handler(struct timer_list *t)
net = sock_net(sk_listener);
max_syn_ack_retries = READ_ONCE(icsk->icsk_syn_retries) ? :
READ_ONCE(net->ipv4.sysctl_tcp_synack_retries);
+ max_syn_ack_retries = min_t(int, max_syn_ack_retries,
+ MAX_TCP_SYNACK_RETRIES);
/* Normally all the openreqs are young and become mature
* (i.e. converted to established socket) for first timeout.
* If synack was not acknowledged for 1 second, it means
@@ -1086,7 +1088,9 @@ static void reqsk_timer_handler(struct timer_list *t)
}
}
- syn_ack_recalc(req, max_syn_ack_retries, READ_ONCE(queue->rskq_defer_accept),
+ syn_ack_recalc(req, max_syn_ack_retries,
+ min_t(u8, READ_ONCE(queue->rskq_defer_accept),
+ MAX_TCP_SYNACK_RETRIES),
&expire, &resend);
tcp_syn_ack_timeout(req);
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index ca1180dba1dea9..f9d233b98bbc6c 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -35,6 +35,7 @@ static int ip_ttl_min = 1;
static int ip_ttl_max = 255;
static int tcp_syn_retries_min = 1;
static int tcp_syn_retries_max = MAX_TCP_SYNCNT;
+static int tcp_synack_retries_max = MAX_TCP_SYNACK_RETRIES;
static int tcp_syn_linear_timeouts_max = MAX_TCP_SYNCNT;
static unsigned long ip_ping_group_range_min[] = { 0, 0 };
static unsigned long ip_ping_group_range_max[] = { GID_T_MAX, GID_T_MAX };
@@ -1034,6 +1035,7 @@ static struct ctl_table ipv4_net_table[] = {
.maxlen = sizeof(u8),
.mode = 0644,
.proc_handler = proc_dou8vec_minmax,
+ .extra2 = &tcp_synack_retries_max
},
#ifdef CONFIG_SYN_COOKIES
{
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
index bf171b5e1eb306..bbedf2b9e1bcea 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -467,6 +467,7 @@ static void tcp_fastopen_synack_timer(struct sock *sk, struct request_sock *req)
*/
max_retries = READ_ONCE(icsk->icsk_syn_retries) ? :
READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_synack_retries) + 1;
+ max_retries = min_t(int, max_retries, MAX_TCP_SYNACK_RETRIES);
if (req->num_timeout >= max_retries) {
tcp_write_err(sk);
@@ -488,7 +489,7 @@ static void tcp_fastopen_synack_timer(struct sock *sk, struct request_sock *req)
if (!tp->retrans_stamp)
tp->retrans_stamp = tcp_time_stamp_ts(tp);
tcp_reset_xmit_timer(sk, ICSK_TIME_RETRANS,
- req->timeout << req->num_timeout, false);
+ tcp_reqsk_timeout_sk(sk, req), false);
}
static bool tcp_rtx_probe0_timed_out(const struct sock *sk,
|
| 3/2 | 2026/06/30 04:43 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 3437 output: 94 thoughts: 686 Thoughts: **Analyzing a TCP Timeout Patch** Okay, so I've got this patch here that's tweaking the TCP request socket timeout logic. It's clamping `max_syn_ack_retries` to `MAX_TCP_SYNACK_RETRIES` (63), which is a good sanity check. The main thing seems to be preventing potential overflows in the `tcp_reqsk_timeout` calculation by guarding against `req->num_timeout` getting too large. It also limits the retries in `reqsk_timer_handler` and `tcp_fastopen_synack_timer` and tweaks the `ipv4_net_table` sysctl for the `tcp_synack_retries` value. This is a core networking change, so it's a functional fix, addressing potential issues in the heart of TCP timeouts. Absolutely worth fuzzing. My initial thought is to identify exactly what's changed. I've pinpointed the relevant functions: `tcp_reqsk_timeout_sk` (this is new), `tcp_reqsk_timeout`, `reqsk_timer_handler`, and `tcp_fastopen_synack_timer`. Now, let's see about any specific configurations. Looks like it touches `inet_connection_sock.c`, `sysctl_net_ipv4.c`, and `tcp_timer.c`, all core IPv4/TCP files. So, it's safe to assume we just need `CONFIG_INET`, no special sauce. Digging deeper, `reqsk_timer_handler` handles those SYN-ACK retransmissions. `tcp_fastopen_synack_timer` is specifically for TCP Fast Open SYN-ACK retries. Given they're both timer handlers, they're called asynchronously, so fuzzing them directly might be tricky, but Syzkaller should be able to trigger them pretty easily by messing with SYNs and TCP Fast Open. Bingo, I remember that `reqsk_timer_handler` is a timer callback. Alright, considering all that, I'm going to set `WorthFuzzing` to `true`. My focus symbols will be `reqsk_timer_handler` and `tcp_fastopen_synack_timer`. No need to enable specific configurations beyond the basics. The reasoning here is: this patch changes core TCP SYN-ACK timeout logic to prevent those pesky shift-out-of-bounds problems and limits the retries, making it a critical functional change within the TCP stack. |
| 4/2 | 2026/06/30 04:43 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [
"reqsk_timer_handler",
"tcp_fastopen_synack_timer"
],
"Reasoning": "The patch modifies TCP SYN-ACK retransmission timeout logic to prevent shift-out-of-bounds and limits the maximum number of SYN-ACK retries. This is a functional change in the core TCP stack.",
"WorthFuzzing": true
}Results: {
"EnableConfigs": null,
"FocusSymbols": [
"reqsk_timer_handler",
"tcp_fastopen_synack_timer"
],
"Reasoning": "The patch modifies TCP SYN-ACK retransmission timeout logic to prevent shift-out-of-bounds and limits the maximum number of SYN-ACK retries. This is a functional change in the core TCP stack.",
"WorthFuzzing": true
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|