| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/09/17 10:11 | flow | patch-triage |
4mArgs:null Results: {
"EnableConfigs": [
"INET",
"MPTCP"
],
"FocusSymbols": [
"__mptcp_push_pending",
"mptcp_push_release",
"mptcp_subflow_reset",
"subflow_state_change"
],
"KMSANReasoning": "The patch makes two targeted changes in MPTCP:\n1. In `mptcp_push_release()`, it checks `if (info-\u003emss_now)` before calling `tcp_push()`. The `info` struct is stack-allocated in `__mptcp_push_pending()` using a designated initializer (`struct mptcp_sendmsg_info info = { .flags = flags };`), which guarantees that all other fields including `mss_now` and `size_goal` are zero-initialized. Thus, `info-\u003emss_now` is well-defined and never uninitialized memory.\n2. A 1-bit field `resetting` is added to `struct mptcp_subflow_context`, carved out of the existing `__unused` bitfield. All instances of `struct mptcp_subflow_context` are allocated using `kzalloc_obj()`, ensuring that `resetting` is zero-initialized at allocation time. It is subsequently set to 1 in `mptcp_subflow_reset()` and checked in `subflow_state_change()`.\n\nNeither change introduces uninitialized data reads, copies uninitialized kernel memory to user space, nor alters buffer bounds/lengths in a manner that could expose uninitialized bytes. Any related bugs (such as state machine desynchronization, socket lifecycle issues, or null pointer dereferences) would be covered by standard kernel detectors and KASAN. Therefore, a dedicated KMSAN fuzzing session is not warranted.",
"NeedsKMSAN": false,
"Reasoning": "The patch modifies reachable MPTCP subflow state management and transmission logic. Specifically, it prevents calling tcp_push when mss_now is 0 in mptcp_push_release, and introduces a 'resetting' flag to skip redundant Rx queue and closed-work scheduling during subflow_state_change while a subflow reset is underway. These changes affect socket lifecycle, state transitions, and packet push paths reachable via standard MPTCP socket operations.",
"WorthFuzzing": true
} |
| 1/1 | 2026/09/17 10:11 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit a8abf6abbc492ba0e6537347371292fc0d683479\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Thu Sep 17 10:11:47 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c\nindex 0098e28309318..709610db3ce9d 100644\n--- a/net/mptcp/protocol.c\n+++ b/net/mptcp/protocol.c\n@@ -1664,7 +1664,9 @@ struct sock *mptcp_subflow_get_send(struct mptcp_sock *msk)\n \n static void mptcp_push_release(struct sock *ssk, struct mptcp_sendmsg_info *info)\n {\n-\ttcp_push(ssk, 0, info-\u003emss_now, tcp_sk(ssk)-\u003enonagle, info-\u003esize_goal);\n+\tif (info-\u003emss_now)\n+\t\ttcp_push(ssk, 0, info-\u003emss_now, tcp_sk(ssk)-\u003enonagle,\n+\t\t\t info-\u003esize_goal);\n \trelease_sock(ssk);\n }\n \ndiff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h\nindex 2b4c274264773..0384d6a023f9d 100644\n--- a/net/mptcp/protocol.h\n+++ b/net/mptcp/protocol.h\n@@ -585,7 +585,8 @@ struct mptcp_subflow_context {\n \t\tis_mptfo : 1,\t /* subflow is doing TFO */\n \t\tclose_event_done : 1, /* has done the post-closed part */\n \t\tmpc_drop : 1,\t /* the MPC option has been dropped in a rtx */\n-\t\t__unused : 9;\n+\t\tresetting : 1,\t /* subflow is resetting */\n+\t\t__unused : 8;\n \tbool\tdata_avail;\n \tbool\tscheduled;\n \tbool\tpm_listener;\t /* a listener managed by the kernel PM? */\ndiff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c\nindex 01db7edce18a6..cbe227d218449 100644\n--- a/net/mptcp/subflow.c\n+++ b/net/mptcp/subflow.c\n@@ -438,6 +438,7 @@ void mptcp_subflow_reset(struct sock *ssk)\n \t/* must hold: tcp_done() could drop last reference on parent */\n \tsock_hold(sk);\n \n+\tsubflow-\u003eresetting = 1;\n \tmptcp_send_active_reset_reason(ssk);\n \ttcp_done(ssk);\n \tif (!test_and_set_bit(MPTCP_WORK_CLOSE_SUBFLOW, \u0026mptcp_sk(sk)-\u003eflags))\n@@ -1883,6 +1884,13 @@ static void subflow_state_change(struct sock *sk)\n \n \t__subflow_state_change(sk);\n \n+\t/* Rx queue processing is unneeded, error reporting will take place at\n+\t * __mptcp_close_ssk() time and subflow reset can't happen in case of\n+\t * fallback: subflow_sched_work_if_closed() would be a no-op.\n+\t */\n+\tif (subflow-\u003eresetting)\n+\t\treturn;\n+\n \t/* as recvmsg() does not acquire the subflow socket for ssk selection\n \t * a fin packet carrying a DSS can be unnoticed if we don't trigger\n \t * the data available machinery here.\n"
} |
| 2/1 | 2026/09/17 10:11 | agent | patch-evaluator |
2mModel:core Args: null Results: {
"EnableConfigs": [
"INET",
"MPTCP"
],
"FocusSymbols": [
"__mptcp_push_pending",
"mptcp_push_release",
"mptcp_subflow_reset",
"subflow_state_change"
],
"Reasoning": "The patch modifies reachable MPTCP subflow state management and transmission logic. Specifically, it prevents calling tcp_push when mss_now is 0 in mptcp_push_release, and introduces a 'resetting' flag to skip redundant Rx queue and closed-work scheduling during subflow_state_change while a subflow reset is underway. These changes affect socket lifecycle, state transitions, and packet push paths reachable via standard MPTCP socket operations.",
"WorthFuzzing": true
}Instruction: You are an expert Linux kernel maintainer and security engineer.
Your job is to review a provided patch series and evaluate whether it warrants fuzzing with syzkaller.
IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in
your workspace. Do NOT rely on internal assumptions. You must actively use your code access
tools to inspect the actual source code, callers, and surrounding context.
================================================================================
1. CORE TRIAGE PHILOSOPHY
================================================================================
The goal of patch fuzzing is to discover crashes, regressions, exposed latent bugs,
and newly triggered assertions introduced by the patch series.
- REACHABILITY IS THE PRIMARY GATE:
Fuzzing can only discover bugs in code that can actually execute in standard virtualized
environments (GCE or QEMU, utilizing software-emulated devices like USB gadgets, netdev, tun/tap).
If the modified code is structurally unreachable (see Section 2), it MUST NOT be fuzzed,
regardless of whether it adds assertions or complex logic.
- DO NOT BLINDLY TRUST "NO FUNCTIONAL CHANGE" (NFCI) OR "REFACTORING" CLAIMS:
Patch authors routinely label changes as "cleanups", "refactorings", or state
"No functional change intended". Do NOT take these claims at face value.
Code refactorings that rearrange logic, introduce helper functions, or alter state management
in core subsystems frequently introduce subtle semantic shifts or uncover latent kernel bugs.
If reachable executable code is modified or refactored, it MUST be fuzzed.
- NEW OR MODIFIED ASSERTIONS IN REACHABLE CODE MUST BE FUZZED:
When a patch introduces or modifies runtime checks or assertions (e.g., WARN_ON*, VM_WARN_ON*,
BUG_ON*, lockdep_assert*) in reachable code paths, it enforces new or stricter invariants.
Even if the author believes the invariant always holds, fuzzing is essential to verify whether
an unusual sequence of operations can violate it.
================================================================================
2. WHEN TO RETURN WorthFuzzing=false (NEGATIVE CRITERIA)
================================================================================
Return WorthFuzzing=false ONLY IF all modified code falls strictly into one or more of these categories:
- Non-kernel and non-executable changes:
* Modifications to Documentation/, comments, or spelling fixes.
* User-space directories, self-tests, samples, or scripts (e.g., tools/, samples/, scripts/, usr/)
that do not affect the compiled kernel image (vmlinux) or kernel modules.
* Purely decorative logging (e.g., message strings in pr_err, printk, dev_info) or tracepoints
that do not alter control flow or data structures.
* Build system or Kconfig changes that do not alter compiled C logic.
- Structurally unreachable hardware:
* Vendor-specific PCIe switches, SmartNICs, or GPU drivers (e.g., mlxsw, pds_core, qed,
ionic, amdgpu) requiring physical ASIC/PCIe cards not emulated in standard QEMU.
- Unreachable execution paths:
* Driver teardown callbacks (.remove, .shutdown, pci_unregister_driver) executed only during
physical PCI hot-unplug or manual sysfs driver unbinding.
* Code paths exclusive to architectures other than the target architecture.
================================================================================
3. WHEN TO RETURN WorthFuzzing=true (POSITIVE CRITERIA)
================================================================================
Return WorthFuzzing=true whenever the patch touches reachable executable code, including:
- Core Subsystems:
* Any logic modifications in memory management (mm/), synchronization/locking (kernel/locking/),
BPF, scheduler, core networking, VFS, or syscall handling.
- Refactorings and Code Cleanups:
* Any restructuring of reachable data structures, helper abstractions, or algorithm flows.
- Runtime Assertions and Defensive Checks:
* Any introduction or alteration of assertions (WARN_ON*, VM_WARN_ON*, BUG_ON*, etc.) in reachable paths.
- Reachable Drivers and Protocols:
* Drivers accessible via virtual buses (virtio, USB gadget, loopback, netlink, binder, sockets, etc.).
================================================================================
4. EXTRACTING FocusSymbols (PREVENTING DILUTION)
================================================================================
When WorthFuzzing=true, you must extract specific kernel functions into FocusSymbols to guide the fuzzer:
- AVOID UBIQUITOUS LIFECYCLE HOT-PATHS:
Do NOT list generic, ubiquitous functions called by almost every program in the corpus
(including, but not limited to: general memory allocators and deallocators, page fault
and trap handlers, or core synchronization primitives; this is not an exhaustive list).
Listing ubiquitous functions causes the fuzzer to classify thousands of unrelated tests as "focused",
which severely dilutes fuzzing effort away from the actual changes.
- TARGET SPECIFIC FEATURE LOGIC AND ENTRYPOINTS:
List functions that specifically implement the logic being added or altered, or direct API entrypoints
for the subsystem feature under review.
- HANDLING STATIC INLINE FUNCTIONS IN HEADERS (.h):
Compiler-inlined static functions (such as static inlines in mm/*.h or include/linux/*.h) lack
distinct symbol addresses in vmlinux and cannot be targeted directly by symbol coverage filters.
If the changes are primarily in static inline helpers, identify non-static, feature-specific caller
functions in .c files that exercise them (avoiding ubiquitous lifecycle wrappers).
================================================================================
5. IDENTIFYING EnableConfigs
================================================================================
Identify any specific CONFIG_ options required to properly compile and reach the modified code:
- Inspect Kconfig files and #ifdef guards; do not make assumptions.
- Check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed.
- Strip any 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4").
Prefer calling several tools at the same time to save round-trips.
Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.
Prompt: Target architecture: amd64
For your convenience, here is the diff of the changes:
commit a8abf6abbc492ba0e6537347371292fc0d683479
Author: syz-cluster <triage@syzkaller.com>
Date: Thu Sep 17 10:11:47 2026 +0000
syz-cluster: applied patch under review
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 0098e28309318..709610db3ce9d 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -1664,7 +1664,9 @@ struct sock *mptcp_subflow_get_send(struct mptcp_sock *msk)
static void mptcp_push_release(struct sock *ssk, struct mptcp_sendmsg_info *info)
{
- tcp_push(ssk, 0, info->mss_now, tcp_sk(ssk)->nonagle, info->size_goal);
+ if (info->mss_now)
+ tcp_push(ssk, 0, info->mss_now, tcp_sk(ssk)->nonagle,
+ info->size_goal);
release_sock(ssk);
}
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index 2b4c274264773..0384d6a023f9d 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -585,7 +585,8 @@ struct mptcp_subflow_context {
is_mptfo : 1, /* subflow is doing TFO */
close_event_done : 1, /* has done the post-closed part */
mpc_drop : 1, /* the MPC option has been dropped in a rtx */
- __unused : 9;
+ resetting : 1, /* subflow is resetting */
+ __unused : 8;
bool data_avail;
bool scheduled;
bool pm_listener; /* a listener managed by the kernel PM? */
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index 01db7edce18a6..cbe227d218449 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -438,6 +438,7 @@ void mptcp_subflow_reset(struct sock *ssk)
/* must hold: tcp_done() could drop last reference on parent */
sock_hold(sk);
+ subflow->resetting = 1;
mptcp_send_active_reset_reason(ssk);
tcp_done(ssk);
if (!test_and_set_bit(MPTCP_WORK_CLOSE_SUBFLOW, &mptcp_sk(sk)->flags))
@@ -1883,6 +1884,13 @@ static void subflow_state_change(struct sock *sk)
__subflow_state_change(sk);
+ /* Rx queue processing is unneeded, error reporting will take place at
+ * __mptcp_close_ssk() time and subflow reset can't happen in case of
+ * fallback: subflow_sched_work_if_closed() would be a no-op.
+ */
+ if (subflow->resetting)
+ return;
+
/* as recvmsg() does not acquire the subflow socket for ssk selection
* a fin packet carrying a DSS can be unnoticed if we don't trigger
* the data available machinery here.
|
| 3/2 | 2026/09/17 10:11 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 3572 output: 38 thoughts: 450 Thoughts: **Evaluating the Syzkaller Fuzzing Potential of This Patch Series** Okay, let's break this down. My initial assessment is whether this patch series is even worth the effort of throwing Syzkaller at it. The modified files – `net/mptcp/protocol.c`, `net/mptcp/protocol.h`, and `net/mptcp/subflow.c` – are all in the MPTCP (Multipath TCP) stack, which immediately gets my attention. MPTCP, by its nature, is a complex area, often touching on subtle concurrency issues and state management, which are prime targets for fuzzing. Now, let's dive into the code. In `net/mptcp/protocol.c`, there's a small change in `mptcp_push_release`. It's a conditional check on `info->mss_now` before calling `tcp_push`. This seems like a potential bug fix or optimization. Nothing immediately screams "vulnerability," but it's worth noting. `net/mptcp/protocol.h` introduces a `resetting : 1;` bitfield within the `struct mptcp_subflow_context`. This indicates a new state or flag related to subflow reset. The inclusion of new state is always good to have a look at. The changes in `net/mptcp/subflow.c` are a bit more interesting. `mptcp_subflow_reset` sets this `resetting` flag. The key part is the new logic in `subflow_state_change`, which adds a conditional `return` based on `subflow->resetting`. This suggests that if a subflow is in a resetting state, some part of the usual processing is bypassed. Specifically, it seems to disable Rx queue processing and error reporting in certain cases. This exclusion of behavior based on a newly introduced state always warrants an inspection. A missed corner case here could be interesting, and a Syzkaller-powered fuzzer might find it. So, the new code path which is being skipped on a `resetting` subflow looks like the most interesting part. I'll need to dig deeper using either `read-file` or `grepper` to see if I can find existing bugs reported around this code. But, overall, the changes here are definitely *potentially* fuzz-worthy, given the context of MPTCP. I'm leaning toward a "yes" for further investigation with Syzkaller, especially around that `resetting` state and the conditional logic. |
| 4/2 | 2026/09/17 10:12 | tool | read-file |
0mArgs:{
"File": "net/mptcp/protocol.c",
"FirstLine": 1650,
"LineCount": 40
}Results: {
"Contents": "1650:\t\t\treturn NULL;\n1651:\t\n1652:\t\tburst = min(MPTCP_SEND_BURST_SIZE, mptcp_wnd_end(msk) - msk-\u003esnd_nxt);\n1653:\t\twmem = READ_ONCE(ssk-\u003esk_wmem_queued);\n1654:\t\tif (!burst)\n1655:\t\t\treturn ssk;\n1656:\t\n1657:\t\tsubflow = mptcp_subflow_ctx(ssk);\n1658:\t\tsubflow-\u003eavg_pacing_rate = div_u64((u64)subflow-\u003eavg_pacing_rate * wmem +\n1659:\t\t\t\t\t\t READ_ONCE(ssk-\u003esk_pacing_rate) * burst,\n1660:\t\t\t\t\t\t burst + wmem);\n1661:\t\tmsk-\u003esnd_burst = burst;\n1662:\t\treturn ssk;\n1663:\t}\n1664:\t\n1665:\tstatic void mptcp_push_release(struct sock *ssk, struct mptcp_sendmsg_info *info)\n1666:\t{\n1667:\t\tif (info-\u003emss_now)\n1668:\t\t\ttcp_push(ssk, 0, info-\u003emss_now, tcp_sk(ssk)-\u003enonagle,\n1669:\t\t\t\t info-\u003esize_goal);\n1670:\t\trelease_sock(ssk);\n1671:\t}\n1672:\t\n1673:\tstatic void mptcp_update_post_push(struct mptcp_sock *msk,\n1674:\t\t\t\t\t struct mptcp_data_frag *dfrag,\n1675:\t\t\t\t\t u32 sent)\n1676:\t{\n1677:\t\tu64 snd_nxt_new = dfrag-\u003edata_seq;\n1678:\t\n1679:\t\tdfrag-\u003ealready_sent += sent;\n1680:\t\n1681:\t\tmsk-\u003esnd_burst -= sent;\n1682:\t\n1683:\t\tsnd_nxt_new += dfrag-\u003ealready_sent;\n1684:\t\n1685:\t\t/* snd_nxt_new can be smaller than snd_nxt in case mptcp\n1686:\t\t * is recovering after a failover. In that event, this re-sends\n1687:\t\t * old segments.\n1688:\t\t *\n1689:\t\t * Thus compute snd_nxt_new candidate based on\n"
} |
| 5/2 | 2026/09/17 10:12 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 5255 output: 38 thoughts: 37 Thoughts: Okay, here's my interpretation of those thoughts, presented as a personal thought process, as requested: **Digging into mptcp subflow handling** Right, let's take a quick look at `net/mptcp/subflow.c`. I'm getting the sense there's something specific going on, so I'm honing in on a couple of sections: lines 430-450 and 1880-1910. I bet that range 430-450 might be around the initial subflow setup or perhaps some critical connection establishment process. I'll need to double check the context of what's happening at this point in the code - perhaps this is where some kind of flow control or initial negotiation is being established. Then, around line 1880-1910... given my experience, I'd guess that's probably some part of the subflow tear-down, graceful close, or maybe even a failure handling routine. Time to open the file and see what's what! I have a hunch that something there is related to an issue that I'm seeing. |
| 6/2 | 2026/09/17 10:12 | tool | read-file |
0mArgs:{
"File": "net/mptcp/subflow.c",
"FirstLine": 430,
"LineCount": 25
}Results: {
"Contents": " 430:\t\tstruct sock *sk = subflow-\u003econn;\n 431:\t\n 432:\t\t/* mptcp_mp_fail_no_response() can reach here on an already closed\n 433:\t\t * socket\n 434:\t\t */\n 435:\t\tif (ssk-\u003esk_state == TCP_CLOSE)\n 436:\t\t\treturn;\n 437:\t\n 438:\t\t/* must hold: tcp_done() could drop last reference on parent */\n 439:\t\tsock_hold(sk);\n 440:\t\n 441:\t\tsubflow-\u003eresetting = 1;\n 442:\t\tmptcp_send_active_reset_reason(ssk);\n 443:\t\ttcp_done(ssk);\n 444:\t\tif (!test_and_set_bit(MPTCP_WORK_CLOSE_SUBFLOW, \u0026mptcp_sk(sk)-\u003eflags))\n 445:\t\t\tmptcp_schedule_work(sk);\n 446:\t\n 447:\t\tsock_put(sk);\n 448:\t}\n 449:\t\n 450:\tstatic bool subflow_use_different_dport(struct mptcp_sock *msk, const struct sock *sk)\n 451:\t{\n 452:\t\treturn inet_sk(sk)-\u003einet_dport != inet_sk((struct sock *)msk)-\u003einet_dport;\n 453:\t}\n 454:\t\n"
} |
| 7/2 | 2026/09/17 10:12 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 5962 output: 39 thoughts: 28 Thoughts: Here's my summary, as if I were the one thinking it: **Digging into Subflow Behavior** Okay, time to dive into this. Based on what I'm seeing, my gut tells me the issue is probably in `net/mptcp/subflow.c`. I'm going to start by taking a close look at lines 1875 to 1920. That area usually deals with subflow management and control, and based on the symptoms, that seems like the most likely spot to find the smoking gun. Let's see what the code's doing around there with connection establishment or teardown, and how it handles different conditions. It's time to put on my debugging hat and see what's what. |
| 8/2 | 2026/09/17 10:12 | tool | read-file |
0mArgs:{
"File": "net/mptcp/subflow.c",
"FirstLine": 1875,
"LineCount": 40
}Results: {
"Contents": "1875:\t\tif (skwq_has_sleeper(wq))\n1876:\t\t\twake_up_interruptible_all(\u0026wq-\u003ewait);\n1877:\t\trcu_read_unlock();\n1878:\t}\n1879:\t\n1880:\tstatic void subflow_state_change(struct sock *sk)\n1881:\t{\n1882:\t\tstruct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);\n1883:\t\tstruct sock *parent = subflow-\u003econn;\n1884:\t\n1885:\t\t__subflow_state_change(sk);\n1886:\t\n1887:\t\t/* Rx queue processing is unneeded, error reporting will take place at\n1888:\t\t * __mptcp_close_ssk() time and subflow reset can't happen in case of\n1889:\t\t * fallback: subflow_sched_work_if_closed() would be a no-op.\n1890:\t\t */\n1891:\t\tif (subflow-\u003eresetting)\n1892:\t\t\treturn;\n1893:\t\n1894:\t\t/* as recvmsg() does not acquire the subflow socket for ssk selection\n1895:\t\t * a fin packet carrying a DSS can be unnoticed if we don't trigger\n1896:\t\t * the data available machinery here.\n1897:\t\t */\n1898:\t\tif (mptcp_subflow_data_available(sk))\n1899:\t\t\tmptcp_data_ready(parent, sk);\n1900:\t\telse if (unlikely(sk-\u003esk_err))\n1901:\t\t\tsubflow_error_report(sk);\n1902:\t\n1903:\t\tsubflow_sched_work_if_closed(mptcp_sk(parent), sk);\n1904:\t}\n1905:\t\n1906:\tvoid mptcp_subflow_queue_clean(struct sock *listener_sk, struct sock *listener_ssk)\n1907:\t{\n1908:\t\tstruct request_sock_queue *queue = \u0026inet_csk(listener_ssk)-\u003eicsk_accept_queue;\n1909:\t\tstruct request_sock *req, *head, *tail;\n1910:\t\tstruct mptcp_subflow_context *subflow;\n1911:\t\tstruct sock *sk, *ssk;\n1912:\t\n1913:\t\t/* Due to lock dependencies no relevant lock can be acquired under rskq_lock.\n1914:\t\t * Splice the req list, so that accept() can not reach the pending ssk after\n"
} |
| 9/2 | 2026/09/17 10:12 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 6877 output: 29 thoughts: 55 Thoughts: **Investigating Recent Changes** Okay, so I need to figure out what's been going on with the recent commits. My first instinct is to reach for `git log` to get a chronological view of the changes or to dive into the specifics of a particular commit. It's the most direct way to understand the evolution of the code. Unfortunately, the Grepper tool isn't equipped for `git log` directly. Hmmm, but I do have the `diff`, so that gives me something to work with. I might be able to glean what I need from the diff and the context surrounding it. Let's see if the relevant commit affected the Kconfig settings. I'll need to check the Kconfig file for any adjustments related to MPTCP. That should give me the crucial details. |
| 10/2 | 2026/09/17 10:13 | tool | grepper |
0mArgs:{
"Expression": "config MPTCP",
"PathPrefix": "net/mptcp"
}Results: {
"Output": "net/mptcp/Kconfig-1-\nnet/mptcp/Kconfig:2:config MPTCP\nnet/mptcp/Kconfig-3-\tbool \"MPTCP: Multipath TCP\"\n--\nnet/mptcp/Kconfig=16=config INET_MPTCP_DIAG\n--\nnet/mptcp/Kconfig-19-\nnet/mptcp/Kconfig:20:config MPTCP_IPV6\nnet/mptcp/Kconfig-21-\tbool \"MPTCP: IPv6 support for Multipath TCP\"\n--\nnet/mptcp/Kconfig-24-\nnet/mptcp/Kconfig:25:config MPTCP_KUNIT_TEST\nnet/mptcp/Kconfig-26-\ttristate \"This builds the MPTCP KUnit tests\" if !KUNIT_ALL_TESTS\n"
} |
| 11/2 | 2026/09/17 10:13 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 7352 output: 34 thoughts: 22 Thoughts: Here's a summary of my thought process, as requested: **Kconfig Inspection: MPTCP Configuration** Okay, time to dive into the Multpath TCP (MPTCP) configuration file, specifically the `net/mptcp/Kconfig` file. I need to refresh my memory on the initial setup options, so let's zero in on the first 25 lines. This section is probably going to lay out the fundamental dependencies, maybe some core feature flags, and potentially the very basic default settings. I'm expecting to see things like whether we need to enable the base MPTCP functionality, if there are different choices for underlying transport protocols, or which debug options are available from the outset. I'll be looking to identify the key variables at play early on in the process. From there, I can begin my deep dive. |
| 12/2 | 2026/09/17 10:13 | tool | read-file |
0mArgs:{
"File": "net/mptcp/Kconfig",
"FirstLine": 1,
"LineCount": 25
}Results: {
"Contents": " 1:\t\n 2:\tconfig MPTCP\n 3:\t\tbool \"MPTCP: Multipath TCP\"\n 4:\t\tdepends on INET\n 5:\t\tselect SKB_EXTENSIONS\n 6:\t\tselect CRYPTO_LIB_SHA256\n 7:\t\tselect CRYPTO_LIB_UTILS\n 8:\t\thelp\n 9:\t\t Multipath TCP (MPTCP) connections send and receive data over multiple\n 10:\t\t subflows in order to utilize multiple network paths. Each subflow\n 11:\t\t uses the TCP protocol, and TCP options carry header information for\n 12:\t\t MPTCP.\n 13:\t\n 14:\tif MPTCP\n 15:\t\n 16:\tconfig INET_MPTCP_DIAG\n 17:\t\tdepends on INET_DIAG\n 18:\t\tdef_tristate INET_DIAG\n 19:\t\n 20:\tconfig MPTCP_IPV6\n 21:\t\tbool \"MPTCP: IPv6 support for Multipath TCP\"\n 22:\t\tdepends on IPV6=y\n 23:\t\tdefault y\n 24:\t\n 25:\tconfig MPTCP_KUNIT_TEST\n"
} |
| 13/2 | 2026/09/17 10:13 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 7894 output: 32 thoughts: 57 Thoughts: **Configuring the System for MPTCP** Okay, so I need to get this MPTCP thing set up. Clearly, MPTCP relies on the INET stack, that's foundational. And looking at the configuration options, `MPTCP` itself is just a boolean. Straightforward. Standard INET is required; that makes sense. So, my config needs to include both `INET` and `MPTCP`. Easy enough to start. Now, let's dig a bit deeper. I should probably understand the surrounding code. I need to understand what's calling `mptcp_push_release`. Time to check the cross-references. |
| 14/2 | 2026/09/17 10:13 | tool | grepper |
0mArgs:{
"Expression": "mptcp_push_release",
"PathPrefix": "net/mptcp"
}Results: {
"Output": "net/mptcp/protocol.c=1589=struct sock *mptcp_subflow_get_send(struct mptcp_sock *msk)\n--\nnet/mptcp/protocol.c-1664-\nnet/mptcp/protocol.c:1665:static void mptcp_push_release(struct sock *ssk, struct mptcp_sendmsg_info *info)\nnet/mptcp/protocol.c-1666-{\n--\nnet/mptcp/protocol.c=1753=void __mptcp_push_pending(struct sock *sk, unsigned int flags)\n--\nnet/mptcp/protocol.c-1782-\t\t\t\t\tif (prev_ssk)\nnet/mptcp/protocol.c:1783:\t\t\t\t\t\tmptcp_push_release(prev_ssk, \u0026info);\nnet/mptcp/protocol.c-1784-\n--\nnet/mptcp/protocol.c-1808-\tif (ssk)\nnet/mptcp/protocol.c:1809:\t\tmptcp_push_release(ssk, \u0026info);\nnet/mptcp/protocol.c-1810-\n"
} |
| 15/2 | 2026/09/17 10:13 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 8429 output: 38 thoughts: 38 Thoughts: Here's a breakdown of my thought process, focusing on `__mptcp_push_pending` from `net/mptcp/protocol.c`, lines 1750-1815. **Analyzing `__mptcp_push_pending`** Alright, let's dive into this specific function, `__mptcp_push_pending`. I need to understand what's happening here regarding the pushing of pending data within the MPTCP framework. Looking at the code from line 1750 to 1815, I expect to see the core logic for managing and potentially sending out segments that are queued but haven't been transmitted yet. My initial questions are: What triggers this function? What state is the connection in when this is called? What exactly constitutes "pending" data in this context – is it buffered in the kernel, waiting for available subflows, or perhaps held back due to congestion control? I'll be looking for clues in the surrounding code regarding the context of this function call. I need to understand how the MPTCP stack decides when and how to send this pending data. I'm focusing on the data structures being manipulated here. Are there specific queues or lists being used? Are there any flags or states being set/cleared that are critical to the data push process? Are there any obvious locks or synchronization primitives involved, and if so, how are they being used to ensure thread-safety or proper concurrency? I'll be paying close attention to any error handling or congestion control interactions. Does this function take into account things like window sizes, retransmission timeouts, and available bandwidth on subflows? Understanding how these factors are addressed is vital to evaluating the overall performance and robustness of the MPTCP implementation. I will also look for any optimizations employed to reduce latency or improve throughput. Ultimately, my goal is to ascertain the critical path for pushing the pending data, identify potential bottlenecks, and understand how this function contributes to the overall MPTCP data transfer process. Any subtle interactions with other parts of the MPTCP stack would be worth noting as they could impact the performance and stability of the multipath connection. |
| 16/2 | 2026/09/17 10:13 | tool | read-file |
0mArgs:{
"File": "net/mptcp/protocol.c",
"FirstLine": 1750,
"LineCount": 65
}Results: {
"Contents": "1750:\t\treturn err;\n1751:\t}\n1752:\t\n1753:\tvoid __mptcp_push_pending(struct sock *sk, unsigned int flags)\n1754:\t{\n1755:\t\tstruct sock *prev_ssk = NULL, *ssk = NULL;\n1756:\t\tstruct mptcp_sock *msk = mptcp_sk(sk);\n1757:\t\tstruct mptcp_sendmsg_info info = {\n1758:\t\t\t\t\t.flags = flags,\n1759:\t\t};\n1760:\t\tbool copied = false;\n1761:\t\tint push_count = 1;\n1762:\t\n1763:\t\twhile (mptcp_send_head(sk) \u0026\u0026 (push_count \u003e 0)) {\n1764:\t\t\tstruct mptcp_subflow_context *subflow;\n1765:\t\t\tint ret = 0;\n1766:\t\n1767:\t\t\tif (mptcp_sched_get_send(msk))\n1768:\t\t\t\tbreak;\n1769:\t\n1770:\t\t\tpush_count = 0;\n1771:\t\n1772:\t\t\tmptcp_for_each_subflow(msk, subflow) {\n1773:\t\t\t\tif (READ_ONCE(subflow-\u003escheduled)) {\n1774:\t\t\t\t\tmptcp_subflow_set_scheduled(subflow, false);\n1775:\t\n1776:\t\t\t\t\tprev_ssk = ssk;\n1777:\t\t\t\t\tssk = mptcp_subflow_tcp_sock(subflow);\n1778:\t\t\t\t\tif (ssk != prev_ssk) {\n1779:\t\t\t\t\t\t/* First check. If the ssk has changed since\n1780:\t\t\t\t\t\t * the last round, release prev_ssk\n1781:\t\t\t\t\t\t */\n1782:\t\t\t\t\t\tif (prev_ssk)\n1783:\t\t\t\t\t\t\tmptcp_push_release(prev_ssk, \u0026info);\n1784:\t\n1785:\t\t\t\t\t\t/* Need to lock the new subflow only if different\n1786:\t\t\t\t\t\t * from the previous one, otherwise we are still\n1787:\t\t\t\t\t\t * helding the relevant lock\n1788:\t\t\t\t\t\t */\n1789:\t\t\t\t\t\tlock_sock(ssk);\n1790:\t\t\t\t\t}\n1791:\t\n1792:\t\t\t\t\tpush_count++;\n1793:\t\n1794:\t\t\t\t\tret = __subflow_push_pending(sk, ssk, \u0026info);\n1795:\t\t\t\t\tif (ret \u003c= 0) {\n1796:\t\t\t\t\t\tif (ret != -EAGAIN ||\n1797:\t\t\t\t\t\t (1 \u003c\u003c ssk-\u003esk_state) \u0026\n1798:\t\t\t\t\t\t (TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2 | TCPF_CLOSE))\n1799:\t\t\t\t\t\t\tpush_count--;\n1800:\t\t\t\t\t\tcontinue;\n1801:\t\t\t\t\t}\n1802:\t\t\t\t\tcopied = true;\n1803:\t\t\t\t}\n1804:\t\t\t}\n1805:\t\t}\n1806:\t\n1807:\t\t/* at this point we held the socket lock for the last subflow we used */\n1808:\t\tif (ssk)\n1809:\t\t\tmptcp_push_release(ssk, \u0026info);\n1810:\t\n1811:\t\t/* Avoid scheduling the rtx timer if no data has been pushed; the timer\n1812:\t\t * will be updated on positive acks by __mptcp_cleanup_una().\n1813:\t\t */\n1814:\t\tif (copied) {\n"
} |
| 17/2 | 2026/09/17 10:13 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 9895 output: 38 thoughts: 66 Thoughts: **Investigating the Caller of `mptcp_push_release` in MPTCP** Okay, so `mptcp_push_release` is a static function, and I know it's directly invoked from `__mptcp_push_pending`. But I'm curious to understand the broader context. What other parts of the MPTCP stack might be calling this function, directly or indirectly? I need to get a better grasp of the control flow. Let's dig into `net/mptcp/protocol.c` and specifically focus on lines 1660 to 1750. This section seems like a logical area to start my investigation. Hopefully, that will give me the answer I am seeking. |
| 18/2 | 2026/09/17 10:13 | tool | read-file |
0mArgs:{
"File": "net/mptcp/protocol.c",
"FirstLine": 1685,
"LineCount": 65
}Results: {
"Contents": "1685:\t\t/* snd_nxt_new can be smaller than snd_nxt in case mptcp\n1686:\t\t * is recovering after a failover. In that event, this re-sends\n1687:\t\t * old segments.\n1688:\t\t *\n1689:\t\t * Thus compute snd_nxt_new candidate based on\n1690:\t\t * the dfrag-\u003edata_seq that was sent and the data\n1691:\t\t * that has been handed to the subflow for transmission\n1692:\t\t * and skip update in case it was old dfrag.\n1693:\t\t */\n1694:\t\tif (likely(after64(snd_nxt_new, msk-\u003esnd_nxt))) {\n1695:\t\t\tmsk-\u003ebytes_sent += snd_nxt_new - msk-\u003esnd_nxt;\n1696:\t\t\tWRITE_ONCE(msk-\u003esnd_nxt, snd_nxt_new);\n1697:\t\t}\n1698:\t}\n1699:\t\n1700:\tvoid mptcp_check_and_set_pending(struct sock *sk)\n1701:\t{\n1702:\t\tif (mptcp_send_head(sk)) {\n1703:\t\t\tmptcp_data_lock(sk);\n1704:\t\t\tmptcp_sk(sk)-\u003ecb_flags |= BIT(MPTCP_PUSH_PENDING);\n1705:\t\t\tmptcp_data_unlock(sk);\n1706:\t\t}\n1707:\t}\n1708:\t\n1709:\tstatic int __subflow_push_pending(struct sock *sk, struct sock *ssk,\n1710:\t\t\t\t\t struct mptcp_sendmsg_info *info)\n1711:\t{\n1712:\t\tstruct mptcp_sock *msk = mptcp_sk(sk);\n1713:\t\tstruct mptcp_data_frag *dfrag;\n1714:\t\tint len, copied = 0, err = 0;\n1715:\t\n1716:\t\twhile ((dfrag = mptcp_send_head(sk))) {\n1717:\t\t\tinfo-\u003esent = dfrag-\u003ealready_sent;\n1718:\t\t\tinfo-\u003elimit = dfrag-\u003edata_len;\n1719:\t\t\tlen = dfrag-\u003edata_len - dfrag-\u003ealready_sent;\n1720:\t\t\twhile (len \u003e 0) {\n1721:\t\t\t\tint ret = 0;\n1722:\t\n1723:\t\t\t\tret = mptcp_sendmsg_frag(sk, ssk, dfrag, info);\n1724:\t\t\t\tif (ret \u003c= 0) {\n1725:\t\t\t\t\terr = copied ? : ret;\n1726:\t\t\t\t\tgoto out;\n1727:\t\t\t\t}\n1728:\t\n1729:\t\t\t\tinfo-\u003esent += ret;\n1730:\t\t\t\tcopied += ret;\n1731:\t\t\t\tlen -= ret;\n1732:\t\n1733:\t\t\t\tmptcp_update_post_push(msk, dfrag, ret);\n1734:\t\t\t}\n1735:\t\t\tmsk-\u003efirst_pending = mptcp_send_next(sk);\n1736:\t\n1737:\t\t\tif (msk-\u003esnd_burst \u003c= 0 ||\n1738:\t\t\t !sk_stream_memory_free(ssk) ||\n1739:\t\t\t !mptcp_subflow_active(mptcp_subflow_ctx(ssk))) {\n1740:\t\t\t\terr = copied;\n1741:\t\t\t\tgoto out;\n1742:\t\t\t}\n1743:\t\t\tmptcp_set_timeout(sk);\n1744:\t\t}\n1745:\t\terr = copied;\n1746:\t\n1747:\tout:\n1748:\t\tif (err \u003e 0)\n1749:\t\t\tmsk-\u003elast_data_sent = tcp_jiffies32;\n"
} |
| 19/2 | 2026/09/17 10:13 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 11176 output: 31 thoughts: 89 Thoughts: Okay, let's break this down. **Investigating the `subflow_state_change` Trigger** Right, so I need to figure out the mechanisms that actually *call* the `subflow_state_change` function. My initial thought is to trace its usage. I know it's related to MPTCP subflows, so that narrows the search considerably. The next logical step is to dive into the MPTCP source code and see where this function is used. I recall from recent work that `subflow_state_change` gets registered using `sk->sk_state_change = subflow_state_change;`. This registration happens during subflow context creation, which means it's likely a callback function tied to a socket. Okay, that's a good starting point. I can search in the `net/mptcp/` directory, knowing that's where the relevant code will be. Let's start there and see what we can dig up. I suspect the search will reveal the situations that trigger a socket state change, which in turn invokes this function. |
| 20/2 | 2026/09/17 10:13 | tool | grepper |
0mArgs:{
"Expression": "subflow_state_change",
"PathPrefix": "net/mptcp"
}Results: {
"Output": "net/mptcp/subflow.c=1847=static struct mptcp_subflow_context *subflow_create_ctx(struct sock *sk,\n--\nnet/mptcp/subflow.c-1868-\nnet/mptcp/subflow.c:1869:static void __subflow_state_change(struct sock *sk)\nnet/mptcp/subflow.c-1870-{\n--\nnet/mptcp/subflow.c-1879-\nnet/mptcp/subflow.c:1880:static void subflow_state_change(struct sock *sk)\nnet/mptcp/subflow.c-1881-{\n--\nnet/mptcp/subflow.c-1884-\nnet/mptcp/subflow.c:1885:\t__subflow_state_change(sk);\nnet/mptcp/subflow.c-1886-\n--\nnet/mptcp/subflow.c=1977=static int subflow_ulp_init(struct sock *sk)\n--\nnet/mptcp/subflow.c-2010-\tsk-\u003esk_write_space = subflow_write_space;\nnet/mptcp/subflow.c:2011:\tsk-\u003esk_state_change = subflow_state_change;\nnet/mptcp/subflow.c-2012-\tsk-\u003esk_error_report = subflow_error_report;\n"
} |
| 21/2 | 2026/09/17 10:13 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 11913 output: 33 thoughts: 14 Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience: **Investigating the `mptcp_subflow_reset` Call Chain** Okay, so I'm looking at `mptcp_subflow_reset`. My primary question right now is: What code path(s) actually *call* this function? I need to understand the trigger points. I'm thinking I can start by using `grep` or a similar tool to pinpoint every instance where this function is invoked within the relevant MPTCP kernel modules. Then, I need to go deeper than just the immediate caller. I need to understand the *why* behind each call. Is it triggered by explicit user space commands, network events, errors, or something else entirely? I'm anticipating there could be a few different scenarios, so I need to be prepared to trace each one back to its root cause. The goal is a comprehensive understanding of when, why, and under what conditions a subflow reset is initiated in MPTCP. I'll need to correlate the call stack with the underlying MPTCP state machine, too. |
| 22/2 | 2026/09/17 10:13 | tool | grepper |
0mArgs:{
"Expression": "mptcp_subflow_reset",
"PathPrefix": "net/mptcp"
}Results: {
"Output": "net/mptcp/options.c=977=static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk,\n--\nnet/mptcp/options.c-1065-reset:\nnet/mptcp/options.c:1066:\tmptcp_subflow_reset(ssk);\nnet/mptcp/options.c-1067-\treturn false;\n--\nnet/mptcp/protocol.c=741=static void mptcp_dss_corruption(struct mptcp_sock *msk, struct sock *ssk)\n--\nnet/mptcp/protocol.c-744-\t\tMPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_DSSCORRUPTIONRESET);\nnet/mptcp/protocol.c:745:\t\tmptcp_subflow_reset(ssk);\nnet/mptcp/protocol.c-746-\t}\n--\nnet/mptcp/protocol.c=1065=static void __mptcp_flush_join_list(struct sock *sk, struct list_head *join_list)\n--\nnet/mptcp/protocol.c-1075-\t\tif (!__mptcp_finish_join(msk, ssk))\nnet/mptcp/protocol.c:1076:\t\t\tmptcp_subflow_reset(ssk);\nnet/mptcp/protocol.c-1077-\t\tunlock_sock_fast(ssk, slow);\n--\nnet/mptcp/protocol.c=1376=static void mptcp_update_infinite_map(struct mptcp_sock *msk,\n--\nnet/mptcp/protocol.c-1387-\t\tMPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_FALLBACKFAILED);\nnet/mptcp/protocol.c:1388:\t\tmptcp_subflow_reset(ssk);\nnet/mptcp/protocol.c-1389-\t\treturn;\n--\nnet/mptcp/protocol.c=3053=static void mptcp_mp_fail_no_response(struct mptcp_sock *msk)\n--\nnet/mptcp/protocol.c-3063-\tslow = lock_sock_fast(ssk);\nnet/mptcp/protocol.c:3064:\tmptcp_subflow_reset(ssk);\nnet/mptcp/protocol.c-3065-\tWRITE_ONCE(mptcp_subflow_ctx(ssk)-\u003efail_tout, 0);\n--\nnet/mptcp/protocol.h=826=void __mptcp_subflow_send_ack(struct sock *ssk);\nnet/mptcp/protocol.h:827:void mptcp_subflow_reset(struct sock *ssk);\nnet/mptcp/protocol.h-828-void mptcp_subflow_queue_clean(struct sock *sk, struct sock *ssk);\n--\nnet/mptcp/subflow.c=411=static bool subflow_thmac_valid(struct mptcp_subflow_context *subflow)\n--\nnet/mptcp/subflow.c-426-\nnet/mptcp/subflow.c:427:void mptcp_subflow_reset(struct sock *ssk)\nnet/mptcp/subflow.c-428-{\n--\nnet/mptcp/subflow.c=524=static void subflow_finish_connect(struct sock *sk, const struct sk_buff *skb)\n--\nnet/mptcp/subflow.c-619-\tsubflow-\u003ereset_transient = 0;\nnet/mptcp/subflow.c:620:\tmptcp_subflow_reset(sk);\nnet/mptcp/subflow.c-621-}\n"
} |
| 23/2 | 2026/09/17 10:13 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 13164 output: 33 thoughts: 580 Thoughts: **MPTCP Fuzzing Strategy: A Deep Dive** Okay, here's how I'm thinking about fuzzing MPTCP. First, the basics: it's reachable through standard socket calls – `AF_INET` and `AF_INET6` with the `SOCK_STREAM` and `IPPROTO_MPTCP` protocols. Good, that's a straightforward start. It's been in Linux networking since 5.6, so it should be reasonably well-established and syzkaller is already on it, which is promising. Now, let's look at the actual changes. There are two key areas: `mptcp_push_release` and the `subflow->resetting` logic in `subflow_state_change`. Specifically, the first change guards against calling `tcp_push` with a zero `mss_now` value, which should prevent a potential issue. The second change avoids processing the receive queue of a subflow and related scheduling if the subflow is in a resetting state, which is likely a race condition fix. Both of these changes are deep in the core MPTCP socket and subflow handling, meaning they're touching code that is critical for MPTCP operation. The first function is found in `net/mptcp/protocol.c` and second one in `net/mptcp/subflow.c` which makes it clear that we're talking about fundamental parts of the protocol. Since MPTCP is accessible via loopback and virtual network devices and syzkaller has pretty extensive support, my initial assessment is that `WorthFuzzing` is definitely `true`. Next, the configurations. I need to make sure `CONFIG_MPTCP` is enabled, which depends on `CONFIG_INET`. I'll want to include both `MPTCP` and `INET` as these are core to the functionality. `CONFIG_MPTCP_IPV6` might be necessary, but `MPTCP` is the foundation. Now for `FocusSymbols`. I need to identify the crucial symbols that directly implement the changed logic. `mptcp_push_release` looks promising, but it's *static*. Right, there's a specific rule about static inlines/functions. Since `mptcp_push_release` is static, I can't directly target it. The rule says to identify the non-static, feature-specific caller functions. So, I need to check the call graph. Looks like the caller is `__mptcp_push_pending`. That's the symbol I need. Now, what calls `__mptcp_push_pending`? That's my starting point for fuzzing. |
| 24/2 | 2026/09/17 10:13 | tool | grepper |
0mArgs:{
"Expression": "__mptcp_push_pending",
"PathPrefix": "net/mptcp"
}Results: {
"Output": "net/mptcp/pm.c=1070=mptcp_pm_subflow_chk_stale(const struct mptcp_sock *msk, struct sock *ssk)\n--\nnet/mptcp/pm.c-1100-\t\t\t */\nnet/mptcp/pm.c:1101:\t\t\t__mptcp_push_pending(sk, 0);\nnet/mptcp/pm.c-1102-\t\t\treturn;\n--\nnet/mptcp/protocol.c=1709=static int __subflow_push_pending(struct sock *sk, struct sock *ssk,\n--\nnet/mptcp/protocol.c-1752-\nnet/mptcp/protocol.c:1753:void __mptcp_push_pending(struct sock *sk, unsigned int flags)\nnet/mptcp/protocol.c-1754-{\n--\nnet/mptcp/protocol.c=1998=static int mptcp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)\n--\nnet/mptcp/protocol.c-2108-\t\tset_bit(SOCK_NOSPACE, \u0026sk-\u003esk_socket-\u003eflags);\nnet/mptcp/protocol.c:2109:\t\t__mptcp_push_pending(sk, msg-\u003emsg_flags);\nnet/mptcp/protocol.c-2110-\t\tret = sk_stream_wait_memory(sk, \u0026timeo);\n--\nnet/mptcp/protocol.c-2122-\t\t}\nnet/mptcp/protocol.c:2123:\t\t__mptcp_push_pending(sk, msg-\u003emsg_flags);\nnet/mptcp/protocol.c-2124-\t}\n--\nnet/mptcp/protocol.c=2642=static void __mptcp_close_ssk(struct sock *sk, struct sock *ssk,\n--\nnet/mptcp/protocol.c-2728-\tif (need_push)\nnet/mptcp/protocol.c:2729:\t\t__mptcp_push_pending(sk, 0);\nnet/mptcp/protocol.c-2730-\n--\nnet/mptcp/protocol.c=3819=static void mptcp_release_cb(struct sock *sk)\n--\nnet/mptcp/protocol.c-3849-\t\tif (flags \u0026 BIT(MPTCP_PUSH_PENDING))\nnet/mptcp/protocol.c:3850:\t\t\t__mptcp_push_pending(sk, 0);\nnet/mptcp/protocol.c-3851-\t\tif (flags \u0026 BIT(MPTCP_RETRANSMIT))\n--\nnet/mptcp/protocol.h=819=void mptcp_check_and_set_pending(struct sock *sk);\nnet/mptcp/protocol.h:820:void __mptcp_push_pending(struct sock *sk, unsigned int flags);\nnet/mptcp/protocol.h-821-bool mptcp_subflow_data_available(struct sock *sk);\n"
} |
| 25/2 | 2026/09/17 10:13 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 15149 output: 174 thoughts: 1097 Thoughts: **Analysis of MPTCP Code Modification for Fuzzing** Alright, let's break this down. My focus here is on identifying the key areas touched by this patch and assessing their suitability for fuzzing. First, I see that `__mptcp_push_pending` is an exported symbol within the MPTCP module, as is `mptcp_subflow_reset`. `subflow_state_change` is static, which is interesting. However, since its address is taken and assigned to `sk->sk_state_change`, it will be a distinct symbol in the compiled kernel image, not inlined. Good to keep track of. Based on the callsites, `mptcp_subflow_reset` and `__mptcp_push_pending` are definitely separate symbols. And given the call structure, `mptcp_push_release` being static means it's likely inlined into `__mptcp_push_pending`. So those four functions are my main targets. Now, a closer look at the actual code modifications: 1. `net/mptcp/protocol.c`: `mptcp_push_release` is modified to include a check for `info->mss_now`. If it is zero, then it will not execute tcp\_push. This is good to fuzz. 2. `net/mptcp/protocol.h`: A `resetting` flag is added to `struct mptcp_subflow_context`. 3. `net/mptcp/subflow.c`: `mptcp_subflow_reset` sets the `resetting` flag. 4. `net/mptcp/subflow.c`: `subflow_state_change` now includes a check for the `resetting` flag, immediately returning if it is set. The `git diff` confirms that the changes are confined to `protocol.c`, `protocol.h`, and `subflow.c`, and that the modified functions are `mptcp_push_release`, `mptcp_subflow_reset`, `subflow_state_change` and the caller of `mptcp_push_release`: `__mptcp_push_pending`. Are these functions general? No, they are all MPTCP-specific, which is precisely what I want, focusing on the MPTCP implementation. `WorthFuzzing` seems to be true. This patch directly modifies core MPTCP subflow reset logic, state change handling, and TCP push release handling. These are reachable through standard socket system calls, and these modifications directly affect state transitions and socket transmission. That makes it great fuzzing material. Regarding configuration, `MPTCP` and `INET` are the required configs. `CONFIG_MPTCP` depends on `CONFIG_INET`. So, the minimal set is `["MPTCP"]` but it's good practice to include `["INET", "MPTCP"]`. Therefore, my `FocusSymbols` are: `__mptcp_push_pending`, `mptcp_push_release`, `mptcp_subflow_reset`, and `subflow_state_change`. My concise reasoning: The patch alters MPTCP subflow state change and reset logic to skip Rx queue processing/subflow scheduling when a subflow is resetting. It also avoids calling `tcp_push` when `info->mss_now` is zero during push release. These changes affect reachable network socket transmission and connection lifecycle paths, making them excellent candidates for syzkaller fuzzing. Everything is clear, and I'm ready to proceed with `set-results`. |
| 26/2 | 2026/09/17 10:14 | tool | set-results |
0mArgs:{
"EnableConfigs": [
"INET",
"MPTCP"
],
"FocusSymbols": [
"__mptcp_push_pending",
"mptcp_push_release",
"mptcp_subflow_reset",
"subflow_state_change"
],
"Reasoning": "The patch modifies reachable MPTCP subflow state management and transmission logic. Specifically, it prevents calling tcp_push when mss_now is 0 in mptcp_push_release, and introduces a 'resetting' flag to skip redundant Rx queue and closed-work scheduling during subflow_state_change while a subflow reset is underway. These changes affect socket lifecycle, state transitions, and packet push paths reachable via standard MPTCP socket operations.",
"WorthFuzzing": true
}Results: {
"EnableConfigs": [
"INET",
"MPTCP"
],
"FocusSymbols": [
"__mptcp_push_pending",
"mptcp_push_release",
"mptcp_subflow_reset",
"subflow_state_change"
],
"Reasoning": "The patch modifies reachable MPTCP subflow state management and transmission logic. Specifically, it prevents calling tcp_push when mss_now is 0 in mptcp_push_release, and introduces a 'resetting' flag to skip redundant Rx queue and closed-work scheduling during subflow_state_change while a subflow reset is underway. These changes affect socket lifecycle, state transitions, and packet push paths reachable via standard MPTCP socket operations.",
"WorthFuzzing": true
} |
| 27/1 | 2026/09/17 10:14 | action | If |
2mArgs:{
"WorthFuzzing": true
}Results: null |
| 28/2 | 2026/09/17 10:14 | agent | kmsan-evaluator |
2mModel:core Args: null Results: {
"KMSANReasoning": "The patch makes two targeted changes in MPTCP:\n1. In `mptcp_push_release()`, it checks `if (info-\u003emss_now)` before calling `tcp_push()`. The `info` struct is stack-allocated in `__mptcp_push_pending()` using a designated initializer (`struct mptcp_sendmsg_info info = { .flags = flags };`), which guarantees that all other fields including `mss_now` and `size_goal` are zero-initialized. Thus, `info-\u003emss_now` is well-defined and never uninitialized memory.\n2. A 1-bit field `resetting` is added to `struct mptcp_subflow_context`, carved out of the existing `__unused` bitfield. All instances of `struct mptcp_subflow_context` are allocated using `kzalloc_obj()`, ensuring that `resetting` is zero-initialized at allocation time. It is subsequently set to 1 in `mptcp_subflow_reset()` and checked in `subflow_state_change()`.\n\nNeither change introduces uninitialized data reads, copies uninitialized kernel memory to user space, nor alters buffer bounds/lengths in a manner that could expose uninitialized bytes. Any related bugs (such as state machine desynchronization, socket lifecycle issues, or null pointer dereferences) would be covered by standard kernel detectors and KASAN. Therefore, a dedicated KMSAN fuzzing session is not warranted.",
"NeedsKMSAN": false
}Instruction: You are an expert Linux kernel security engineer specializing in kernel memory
error detectors (KASAN and KMSAN). Your job is to review the provided patch series and
determine if the code changes justify spawning a dedicated KMSAN (KernelMemorySanitizer)
fuzzing session in addition to standard KASAN fuzzing.
CRITICAL DISTINCTION BETWEEN KASAN AND KMSAN:
- Standard KASAN kernel builds (upstream-apparmor-kasan.config) already enable
a comprehensive suite of debugging tools and sanitizers, including KASAN
(out-of-bounds accesses, use-after-free, double free, invalid free), LOCKDEP
(locking bugs and deadlocks), UB-sanitizers, and memory corruption checks.
- KMSAN (KernelMemorySanitizer) detects reads of UNINITIALIZED memory (stack, heap,
or page allocations) and kernel-to-user memory info-leaks.
Rule: THERE IS NO SENSE IN RUNNING A KMSAN SESSION IF A BUG CAN BE CAUGHT BY KASAN,
LOCKDEP, OR OTHER STANDARD BUG DETECTORS.
A dedicated KMSAN fuzzing session incurs significant resource costs. You must ONLY
set NeedsKMSAN=true if the code changes introduce or expose UNINITIALIZED MEMORY risks
that are detected ONLY by KMSAN.
Look holistically at the patch series and surrounding code. Even if no direct
uninitialized field accesses or new buffer allocations are added in the diff itself,
a patch may alter control flow, bounds checking, or data length calculations in ways
that change how the rest of the code operates on existing buffers (e.g. allowing
uninitialized stack/heap memory to be read, copied to user space, or used in control
flow). Do not hesitate to use your code access tools to inspect the surrounding code,
called functions, and callers.
Set NeedsKMSAN=true ONLY IF the patch introduces or modifies:
1. Kernel structures sent to user space (via copy_to_user, put_user, netlink skb
attributes, ioctl output arguments, socket options, or BPF buffers) where fields
or structure padding might not be fully initialized/zeroed.
2. Conditional logic or branching that depends on potentially uninitialized variables
or struct fields.
3. Allocation or initialization of complex data structures where uninitialized fields
could be read later in reachable code paths.
4. Bounds checks, lengths, or logic in a way that allows surrounding code to access
uninitialized bytes of existing buffers.
Set NeedsKMSAN=false IF:
- The code changes primarily risk out-of-bounds access, array overflows, NULL pointer
dereferences, locking deadlocks, or use-after-free bugs (these are already caught
by KASAN, LOCKDEP, or standard bug detectors).
- All stack/heap structures touched or introduced by the patch are fully zeroed
or initialized (e.g. using = {0}, memset, kzalloc) before being read or copied.
- The patch does not introduce any risk of uninitialized memory usage or info-leaks.
Use your code access tools to inspect the surrounding code if necessary, then provide
detailed KMSANReasoning contrasting KASAN vs KMSAN applicability for this patch.
Prefer calling several tools at the same time to save round-trips.
Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.
Prompt: Target architecture: amd64
For your convenience, here is the diff of the changes:
commit a8abf6abbc492ba0e6537347371292fc0d683479
Author: syz-cluster <triage@syzkaller.com>
Date: Thu Sep 17 10:11:47 2026 +0000
syz-cluster: applied patch under review
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 0098e28309318..709610db3ce9d 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -1664,7 +1664,9 @@ struct sock *mptcp_subflow_get_send(struct mptcp_sock *msk)
static void mptcp_push_release(struct sock *ssk, struct mptcp_sendmsg_info *info)
{
- tcp_push(ssk, 0, info->mss_now, tcp_sk(ssk)->nonagle, info->size_goal);
+ if (info->mss_now)
+ tcp_push(ssk, 0, info->mss_now, tcp_sk(ssk)->nonagle,
+ info->size_goal);
release_sock(ssk);
}
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index 2b4c274264773..0384d6a023f9d 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -585,7 +585,8 @@ struct mptcp_subflow_context {
is_mptfo : 1, /* subflow is doing TFO */
close_event_done : 1, /* has done the post-closed part */
mpc_drop : 1, /* the MPC option has been dropped in a rtx */
- __unused : 9;
+ resetting : 1, /* subflow is resetting */
+ __unused : 8;
bool data_avail;
bool scheduled;
bool pm_listener; /* a listener managed by the kernel PM? */
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index 01db7edce18a6..cbe227d218449 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -438,6 +438,7 @@ void mptcp_subflow_reset(struct sock *ssk)
/* must hold: tcp_done() could drop last reference on parent */
sock_hold(sk);
+ subflow->resetting = 1;
mptcp_send_active_reset_reason(ssk);
tcp_done(ssk);
if (!test_and_set_bit(MPTCP_WORK_CLOSE_SUBFLOW, &mptcp_sk(sk)->flags))
@@ -1883,6 +1884,13 @@ static void subflow_state_change(struct sock *sk)
__subflow_state_change(sk);
+ /* Rx queue processing is unneeded, error reporting will take place at
+ * __mptcp_close_ssk() time and subflow reset can't happen in case of
+ * fallback: subflow_sched_work_if_closed() would be a no-op.
+ */
+ if (subflow->resetting)
+ return;
+
/* as recvmsg() does not acquire the subflow socket for ssk selection
* a fin packet carrying a DSS can be unnoticed if we don't trigger
* the data available machinery here.
|
| 29/3 | 2026/09/17 10:14 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 2784 output: 32 thoughts: 1015 Thoughts: **KMSAN Fuzzing Session Justification** Okay, let's break this down. My initial assessment is whether this patch series warrants a dedicated KMSAN fuzzing session, beyond the usual KASAN checks we run. The goal is to determine if it introduces any new memory safety vulnerabilities that KASAN might miss. First, I see changes primarily within the MultiPath TCP (MPTCP) implementation. The core changes appear to be in `net/mptcp/protocol.c`, `net/mptcp/protocol.h`, and `net/mptcp/subflow.c`. I note the `mptcp_push_release` function now has a conditional call to `tcp_push` based on `info->mss_now`. That's interesting; it's a potential area for subtle bugs related to the MultiPath TCP send path. In `protocol.h`, a new flag `resetting` is added to the `mptcp_subflow_context` struct. This suggests there are new states or control flow paths related to subflow resets. The comment indicates this needs special handling of the Rx queue. In `subflow.c`, the `mptcp_subflow_reset` function is modified to set the `resetting` flag before calling `tcp_done`, and there is now a conditional early return inside `subflow_state_change` if the `resetting` flag is set. The comments state this is for error reporting. This area looks like the most likely place for memory safety issues. Resetting a subflow can be complex, and any new code path there, particularly around flags and early exits, is a high-risk area. I need to understand the lifecycle of `struct mptcp_subflow_context` and where `mptcp_sendmsg_info` comes from. I'll need to use my tools to locate the allocations and initialization of `struct mptcp_subflow_context` and the source of `mptcp_sendmsg_info`. I'll want to trace how those structs are used around the new code paths, specifically when the `resetting` flag is involved. This will tell me if the new flag, its use, and its early-exit point introduce any new race conditions, use-after-free conditions, or other memory errors that could be exploitable, and might be missed by KASAN because it would be a very subtle bug. My expert intuition suggests this *could* be worth the dedicated fuzzing session, because of the changes to the reset process, but I want to be *sure* by understanding the full context. If my deeper analysis reveals no new risky scenarios around memory management, I'll pass on the dedicated fuzzing session. But for now, this patch has my attention. |
| 30/3 | 2026/09/17 10:14 | tool | grepper |
0mArgs:{
"Expression": "mptcp_push_release",
"PathPrefix": "net/mptcp"
}Results: {
"Output": "net/mptcp/protocol.c=1589=struct sock *mptcp_subflow_get_send(struct mptcp_sock *msk)\n--\nnet/mptcp/protocol.c-1664-\nnet/mptcp/protocol.c:1665:static void mptcp_push_release(struct sock *ssk, struct mptcp_sendmsg_info *info)\nnet/mptcp/protocol.c-1666-{\n--\nnet/mptcp/protocol.c=1753=void __mptcp_push_pending(struct sock *sk, unsigned int flags)\n--\nnet/mptcp/protocol.c-1782-\t\t\t\t\tif (prev_ssk)\nnet/mptcp/protocol.c:1783:\t\t\t\t\t\tmptcp_push_release(prev_ssk, \u0026info);\nnet/mptcp/protocol.c-1784-\n--\nnet/mptcp/protocol.c-1808-\tif (ssk)\nnet/mptcp/protocol.c:1809:\t\tmptcp_push_release(ssk, \u0026info);\nnet/mptcp/protocol.c-1810-\n"
} |
| 31/3 | 2026/09/17 10:14 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 4735 output: 38 thoughts: 28 Thoughts: Here's a summary of my mental process: **Diving into the MPTCP Protocol Implementation** Alright, let's get down to brass tacks. I need to take a look at the MultiPath TCP implementation, specifically within the `net/mptcp/protocol.c` file. My focus is going to be centered around lines 1750 to 1815. I'm expecting this section to provide some critical insight into a specific aspect of the protocol, perhaps connection management, data transmission logic, or even congestion control, within the MPTCP framework. I'll need to carefully parse the code, considering its interaction with surrounding functions and data structures. It's likely I'll be looking at a specific exchange of information. |
| 32/3 | 2026/09/17 10:14 | tool | read-file |
0mArgs:{
"File": "net/mptcp/protocol.c",
"FirstLine": 1750,
"LineCount": 70
}Results: {
"Contents": "1750:\t\treturn err;\n1751:\t}\n1752:\t\n1753:\tvoid __mptcp_push_pending(struct sock *sk, unsigned int flags)\n1754:\t{\n1755:\t\tstruct sock *prev_ssk = NULL, *ssk = NULL;\n1756:\t\tstruct mptcp_sock *msk = mptcp_sk(sk);\n1757:\t\tstruct mptcp_sendmsg_info info = {\n1758:\t\t\t\t\t.flags = flags,\n1759:\t\t};\n1760:\t\tbool copied = false;\n1761:\t\tint push_count = 1;\n1762:\t\n1763:\t\twhile (mptcp_send_head(sk) \u0026\u0026 (push_count \u003e 0)) {\n1764:\t\t\tstruct mptcp_subflow_context *subflow;\n1765:\t\t\tint ret = 0;\n1766:\t\n1767:\t\t\tif (mptcp_sched_get_send(msk))\n1768:\t\t\t\tbreak;\n1769:\t\n1770:\t\t\tpush_count = 0;\n1771:\t\n1772:\t\t\tmptcp_for_each_subflow(msk, subflow) {\n1773:\t\t\t\tif (READ_ONCE(subflow-\u003escheduled)) {\n1774:\t\t\t\t\tmptcp_subflow_set_scheduled(subflow, false);\n1775:\t\n1776:\t\t\t\t\tprev_ssk = ssk;\n1777:\t\t\t\t\tssk = mptcp_subflow_tcp_sock(subflow);\n1778:\t\t\t\t\tif (ssk != prev_ssk) {\n1779:\t\t\t\t\t\t/* First check. If the ssk has changed since\n1780:\t\t\t\t\t\t * the last round, release prev_ssk\n1781:\t\t\t\t\t\t */\n1782:\t\t\t\t\t\tif (prev_ssk)\n1783:\t\t\t\t\t\t\tmptcp_push_release(prev_ssk, \u0026info);\n1784:\t\n1785:\t\t\t\t\t\t/* Need to lock the new subflow only if different\n1786:\t\t\t\t\t\t * from the previous one, otherwise we are still\n1787:\t\t\t\t\t\t * helding the relevant lock\n1788:\t\t\t\t\t\t */\n1789:\t\t\t\t\t\tlock_sock(ssk);\n1790:\t\t\t\t\t}\n1791:\t\n1792:\t\t\t\t\tpush_count++;\n1793:\t\n1794:\t\t\t\t\tret = __subflow_push_pending(sk, ssk, \u0026info);\n1795:\t\t\t\t\tif (ret \u003c= 0) {\n1796:\t\t\t\t\t\tif (ret != -EAGAIN ||\n1797:\t\t\t\t\t\t (1 \u003c\u003c ssk-\u003esk_state) \u0026\n1798:\t\t\t\t\t\t (TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2 | TCPF_CLOSE))\n1799:\t\t\t\t\t\t\tpush_count--;\n1800:\t\t\t\t\t\tcontinue;\n1801:\t\t\t\t\t}\n1802:\t\t\t\t\tcopied = true;\n1803:\t\t\t\t}\n1804:\t\t\t}\n1805:\t\t}\n1806:\t\n1807:\t\t/* at this point we held the socket lock for the last subflow we used */\n1808:\t\tif (ssk)\n1809:\t\t\tmptcp_push_release(ssk, \u0026info);\n1810:\t\n1811:\t\t/* Avoid scheduling the rtx timer if no data has been pushed; the timer\n1812:\t\t * will be updated on positive acks by __mptcp_cleanup_una().\n1813:\t\t */\n1814:\t\tif (copied) {\n1815:\t\t\tif (!mptcp_rtx_timer_pending(sk))\n1816:\t\t\t\tmptcp_reset_rtx_timer(sk);\n1817:\t\t\tmptcp_check_send_data_fin(sk);\n1818:\t\t}\n1819:\t}\n"
} |
| 33/3 | 2026/09/17 10:14 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 5976 output: 32 thoughts: 136 Thoughts: **Analyzing the `__mptcp_push_pending` Function**
Okay, let's break down this `__mptcp_push_pending` function. My expert eye immediately hones in on the initialization of the `info` struct within it. Specifically, that line:
```c
struct mptcp_sendmsg_info info = {
.flags = flags,
};
```
Right, designated initializers in C. Clever. This means that, apart from `flags`, all the other members of `info` are going to be implicitly zeroed out. So, `info.data_lock_held` is zero, `info.mss_now` is zero, and `info.size_goal` is also initialized to zero. This is important to remember because these zeroed values might become significant later on during the function's execution. It's almost certain this zero initialization is purposeful, setting a known starting state.
Now, the next logical step is to understand how `info` is used. I need to trace this `info` struct's flow, especially how it's handled when `__subflow_push_pending` is called. It's likely that function relies on the initial state of these variables, especially if they are involved in deciding how much data to transmit. I need to carefully scrutinize what `__subflow_push_pending` does with `info` to determine the implications of this implicit zero initialization. This is where the real work begins.
|
| 34/3 | 2026/09/17 10:14 | tool | grepper |
0mArgs:{
"Expression": "__subflow_push_pending",
"PathPrefix": "net/mptcp"
}Results: {
"Output": "net/mptcp/protocol.c=1700=void mptcp_check_and_set_pending(struct sock *sk)\n--\nnet/mptcp/protocol.c-1708-\nnet/mptcp/protocol.c:1709:static int __subflow_push_pending(struct sock *sk, struct sock *ssk,\nnet/mptcp/protocol.c-1710-\t\t\t\t struct mptcp_sendmsg_info *info)\n--\nnet/mptcp/protocol.c=1753=void __mptcp_push_pending(struct sock *sk, unsigned int flags)\n--\nnet/mptcp/protocol.c-1793-\nnet/mptcp/protocol.c:1794:\t\t\t\tret = __subflow_push_pending(sk, ssk, \u0026info);\nnet/mptcp/protocol.c-1795-\t\t\t\tif (ret \u003c= 0) {\n--\nnet/mptcp/protocol.c=1821=static void __mptcp_subflow_push_pending(struct sock *sk, struct sock *ssk, bool first)\n--\nnet/mptcp/protocol.c-1840-\t\t\tmptcp_subflow_set_scheduled(subflow, false);\nnet/mptcp/protocol.c:1841:\t\t\tret = __subflow_push_pending(sk, ssk, \u0026info);\nnet/mptcp/protocol.c-1842-\t\t\tfirst = false;\n--\nnet/mptcp/protocol.c-1853-\t\t\tmptcp_subflow_set_scheduled(subflow, false);\nnet/mptcp/protocol.c:1854:\t\t\tret = __subflow_push_pending(sk, ssk, \u0026info);\nnet/mptcp/protocol.c-1855-\t\t\tif (ret \u003c= 0)\n"
} |
| 35/3 | 2026/09/17 10:14 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 6939 output: 38 thoughts: 39 Thoughts: Here's my summary, as though I'm thinking through this process: **Diving into the MPTCP Subflow Push Mechanism** Okay, time to get my hands dirty with the nitty-gritty of MPTCP. I'm focusing on how subflows are handled, specifically the "push" mechanisms. I need to understand how data gets moved across these subflows. Let's start with a look at `__subflow_push_pending` and `__mptcp_subflow_push_pending` within `net/mptcp/protocol.c`. I expect these functions are the core of managing data waiting to be transmitted. I'm guessing one might be a general, lower-level function, and the other could be the MPTCP-specific version, or perhaps they have a clear distinction in purpose, where perhaps one is for individual subflows, and the other for the MPTCP connection as a whole. I'm eager to understand the conditions triggering a "push" – are we talking about buffers filling, timeouts, congestion control signaling, or a combination? Also, what's the difference in where the data is read from and written to, and when. I expect to see interactions with the TCP stack and maybe some logic that orchestrates sending data across different paths. My immediate goal is to understand how these functions contribute to the overall MPTCP data transfer strategy, and how they relate to the congestion control and path management aspects of the protocol. This initial dive will inform the subsequent deeper work I'll have to do. |
| 36/3 | 2026/09/17 10:14 | tool | read-file |
0mArgs:{
"File": "net/mptcp/protocol.c",
"FirstLine": 1705,
"LineCount": 45
}Results: {
"Contents": "1705:\t\t\tmptcp_data_unlock(sk);\n1706:\t\t}\n1707:\t}\n1708:\t\n1709:\tstatic int __subflow_push_pending(struct sock *sk, struct sock *ssk,\n1710:\t\t\t\t\t struct mptcp_sendmsg_info *info)\n1711:\t{\n1712:\t\tstruct mptcp_sock *msk = mptcp_sk(sk);\n1713:\t\tstruct mptcp_data_frag *dfrag;\n1714:\t\tint len, copied = 0, err = 0;\n1715:\t\n1716:\t\twhile ((dfrag = mptcp_send_head(sk))) {\n1717:\t\t\tinfo-\u003esent = dfrag-\u003ealready_sent;\n1718:\t\t\tinfo-\u003elimit = dfrag-\u003edata_len;\n1719:\t\t\tlen = dfrag-\u003edata_len - dfrag-\u003ealready_sent;\n1720:\t\t\twhile (len \u003e 0) {\n1721:\t\t\t\tint ret = 0;\n1722:\t\n1723:\t\t\t\tret = mptcp_sendmsg_frag(sk, ssk, dfrag, info);\n1724:\t\t\t\tif (ret \u003c= 0) {\n1725:\t\t\t\t\terr = copied ? : ret;\n1726:\t\t\t\t\tgoto out;\n1727:\t\t\t\t}\n1728:\t\n1729:\t\t\t\tinfo-\u003esent += ret;\n1730:\t\t\t\tcopied += ret;\n1731:\t\t\t\tlen -= ret;\n1732:\t\n1733:\t\t\t\tmptcp_update_post_push(msk, dfrag, ret);\n1734:\t\t\t}\n1735:\t\t\tmsk-\u003efirst_pending = mptcp_send_next(sk);\n1736:\t\n1737:\t\t\tif (msk-\u003esnd_burst \u003c= 0 ||\n1738:\t\t\t !sk_stream_memory_free(ssk) ||\n1739:\t\t\t !mptcp_subflow_active(mptcp_subflow_ctx(ssk))) {\n1740:\t\t\t\terr = copied;\n1741:\t\t\t\tgoto out;\n1742:\t\t\t}\n1743:\t\t\tmptcp_set_timeout(sk);\n1744:\t\t}\n1745:\t\terr = copied;\n1746:\t\n1747:\tout:\n1748:\t\tif (err \u003e 0)\n1749:\t\t\tmsk-\u003elast_data_sent = tcp_jiffies32;\n"
} |
| 37/3 | 2026/09/17 10:14 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 8010 output: 28 thoughts: 72 Thoughts: **Investigating a Potential MPTCP Subflow Issue** Okay, let's dive in. I'm looking at `__subflow_push_pending` and I'm a bit concerned about a couple of things. Specifically, what happens if `dfrag = mptcp_send_head(sk)` returns NULL? Or, alternatively, what if the loop within that function doesn't correctly set `info->mss_now`? I know I've seen some oddities in that section before. This could explain those intermittent performance issues I saw on a client's system last week! Hang on a second... where *is* `info->mss_now` actually being set? I'm going to have to do a quick grep search for `mss_now` to trace its definition and see where the value gets assigned. Gotta find the root cause, as always! This needs to be understood before I can be confident with a fix. |
| 38/3 | 2026/09/17 10:14 | tool | grepper |
0mArgs:{
"Expression": "mss_now",
"PathPrefix": "net/mptcp"
}Results: {
"Output": "net/mptcp/protocol.c=1281=struct mptcp_sendmsg_info {\nnet/mptcp/protocol.c:1282:\tint mss_now;\nnet/mptcp/protocol.c-1283-\tint size_goal;\n--\nnet/mptcp/protocol.c=1397=static int mptcp_sendmsg_frag(struct sock *sk, struct sock *ssk,\n--\nnet/mptcp/protocol.c-1424-\t\tssk-\u003esk_gso_max_size = MPTCP_MAX_GSO_SIZE;\nnet/mptcp/protocol.c:1425:\tinfo-\u003emss_now = tcp_send_mss(ssk, \u0026info-\u003esize_goal, info-\u003eflags);\nnet/mptcp/protocol.c-1426-\tcopy = info-\u003esize_goal;\n--\nnet/mptcp/protocol.c=1665=static void mptcp_push_release(struct sock *ssk, struct mptcp_sendmsg_info *info)\nnet/mptcp/protocol.c-1666-{\nnet/mptcp/protocol.c:1667:\tif (info-\u003emss_now)\nnet/mptcp/protocol.c:1668:\t\ttcp_push(ssk, 0, info-\u003emss_now, tcp_sk(ssk)-\u003enonagle,\nnet/mptcp/protocol.c-1669-\t\t\t info-\u003esize_goal);\n--\nnet/mptcp/protocol.c=1821=static void __mptcp_subflow_push_pending(struct sock *sk, struct sock *ssk, bool first)\n--\nnet/mptcp/protocol.c-1876-\tif (copied) {\nnet/mptcp/protocol.c:1877:\t\ttcp_push(ssk, 0, info.mss_now, tcp_sk(ssk)-\u003enonagle,\nnet/mptcp/protocol.c-1878-\t\t\t info.size_goal);\n--\nnet/mptcp/protocol.c=2862=static int __mptcp_push_retrans(struct sock *sk, struct mptcp_data_frag *dfrag,\n--\nnet/mptcp/protocol.c-2911-\t\t\t\tlen = max(copied, len);\nnet/mptcp/protocol.c:2912:\t\t\t\ttcp_push(ssk, 0, info.mss_now, tcp_sk(ssk)-\u003enonagle,\nnet/mptcp/protocol.c-2913-\t\t\t\t\t info.size_goal);\n"
} |
| 39/3 | 2026/09/17 10:14 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 8962 output: 31 thoughts: 711 Thoughts: **Analyzing the MPTCP Push and Subflow Reset Patches** Okay, let's break this down. First, I noticed that `info` within `__mptcp_push_pending` is explicitly initialized to zero. This seems straightforward, but it highlighted a potential issue. If `__subflow_push_pending` fails before `mptcp_sendmsg_frag` or isn't called, `info.mss_now` remains at zero. The subsequent call to `mptcp_push_release` then previously passed a zero value to `tcp_push`, which could lead to issues like division by zero, zero MSS packets, or triggering `BUG_ON/WARN_ON`. The patch elegantly addresses this by adding a check within `mptcp_push_release` to only call `tcp_push` if `info->mss_now` is non-zero, preventing the problematic call. The author even correctly noted that `info` isn't *uninitialized*; it's initialized to zero, which is critical to understand the bug's context. Now, let's shift focus to the second part of the patch concerning the `struct mptcp_subflow_context`. The changes introduce a new field, `resetting`, to track the state of a resetting subflow. The code now sets `subflow->resetting = 1` within `mptcp_subflow_reset` and checks this flag in `subflow_state_change`. The comments suggest that this new flag avoids unnecessary Rx queue processing or error reporting when a subflow is being reset. Specifically, because the error reporting takes place during the `__mptcp_close_ssk()` time and subflow reset cannot happen if the fallback occurs. So now the state change logic can bypass the subflow scheduler work when the subflow is being reset. My next step is to examine the allocation and initialization of `struct mptcp_subflow_context` to gain a deeper understanding of its lifecycle, by grepping for instances of `subflow_context` or `subflow_create_ctx`. This will allow me to assess the overall impact and correctness of these changes. |
| 40/3 | 2026/09/17 10:14 | tool | grepper |
0mArgs:{
"Expression": "subflow_create_ctx",
"PathPrefix": "net/mptcp"
}Results: {
"Output": "net/mptcp/subflow.c=1782=int mptcp_subflow_create_socket(struct sock *sk, unsigned short family,\n--\nnet/mptcp/subflow.c-1846-\nnet/mptcp/subflow.c:1847:static struct mptcp_subflow_context *subflow_create_ctx(struct sock *sk,\nnet/mptcp/subflow.c-1848-\t\t\t\t\t\t\tgfp_t priority)\n--\nnet/mptcp/subflow.c=1977=static int subflow_ulp_init(struct sock *sk)\n--\nnet/mptcp/subflow.c-1991-\nnet/mptcp/subflow.c:1992:\tctx = subflow_create_ctx(sk, GFP_KERNEL);\nnet/mptcp/subflow.c-1993-\tif (!ctx) {\n--\nnet/mptcp/subflow.c=2048=static void subflow_ulp_clone(const struct request_sock *req,\n--\nnet/mptcp/subflow.c-2061-\nnet/mptcp/subflow.c:2062:\tnew_ctx = subflow_create_ctx(newsk, priority);\nnet/mptcp/subflow.c-2063-\tif (!new_ctx) {\n"
} |
| 41/3 | 2026/09/17 10:14 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 10519 output: 39 thoughts: 25 Thoughts: Here's my summary, as though I'm reading and processing the request: **Diving into the Subflow Creation Context** Alright, let's get down to brass tacks. I'm being pointed to `subflow_create_ctx` within `net/mptcp/subflow.c`. That tells me right away we're dealing with the core MPTCP (Multipath TCP) subflow creation process. My gut tells me this is where the magic happens, where new data streams within an MPTCP connection get initialized. I'm expecting to find the nuts and bolts of how a subflow is set up: things like resource allocation, data structure initialization, and perhaps even the early handshake procedures that are necessary. I'll be looking specifically for how the context for a new subflow is established and handled by the kernel. |
| 42/3 | 2026/09/17 10:14 | tool | read-file |
0mArgs:{
"File": "net/mptcp/subflow.c",
"FirstLine": 1845,
"LineCount": 40
}Results: {
"Contents": "1845:\t}\n1846:\t\n1847:\tstatic struct mptcp_subflow_context *subflow_create_ctx(struct sock *sk,\n1848:\t\t\t\t\t\t\t\tgfp_t priority)\n1849:\t{\n1850:\t\tstruct inet_connection_sock *icsk = inet_csk(sk);\n1851:\t\tstruct mptcp_subflow_context *ctx;\n1852:\t\n1853:\t\tctx = kzalloc_obj(*ctx, priority);\n1854:\t\tif (!ctx)\n1855:\t\t\treturn NULL;\n1856:\t\n1857:\t\trcu_assign_pointer(icsk-\u003eicsk_ulp_data, ctx);\n1858:\t\tINIT_LIST_HEAD(\u0026ctx-\u003enode);\n1859:\t\tINIT_LIST_HEAD(\u0026ctx-\u003edelegated_node);\n1860:\t\n1861:\t\tpr_debug(\"subflow=%p\\n\", ctx);\n1862:\t\n1863:\t\tctx-\u003etcp_sock = sk;\n1864:\t\tWRITE_ONCE(ctx-\u003elocal_id, -1);\n1865:\t\n1866:\t\treturn ctx;\n1867:\t}\n1868:\t\n1869:\tstatic void __subflow_state_change(struct sock *sk)\n1870:\t{\n1871:\t\tstruct socket_wq *wq;\n1872:\t\n1873:\t\trcu_read_lock();\n1874:\t\twq = rcu_dereference(sk-\u003esk_wq);\n1875:\t\tif (skwq_has_sleeper(wq))\n1876:\t\t\twake_up_interruptible_all(\u0026wq-\u003ewait);\n1877:\t\trcu_read_unlock();\n1878:\t}\n1879:\t\n1880:\tstatic void subflow_state_change(struct sock *sk)\n1881:\t{\n1882:\t\tstruct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);\n1883:\t\tstruct sock *parent = subflow-\u003econn;\n1884:\t\n"
} |
| 43/3 | 2026/09/17 10:14 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 11341 output: 38 thoughts: 69 Thoughts: **My Initial Thoughts on Subflow Context Allocation** Okay, so I see this line: `ctx = kzalloc_obj(*ctx, priority);`. Right away, my expert eye picks up on the fact that we're allocating memory for a `struct mptcp_subflow_context` using `kzalloc_obj`. The immediate implication is zero-initialization; that's key. It means that fields like `resetting` and `__unused`, and every other member of this struct, are all set to their default, typically zero, values at the start. That initial clean slate is important for avoiding unexpected behavior down the line. I'll need to remember that as I move through the code. Now, let's take a look at `mptcp_subflow_reset`. I need to figure out what it does in relation to the new context. |
| 44/3 | 2026/09/17 10:15 | tool | read-file |
0mArgs:{
"File": "net/mptcp/subflow.c",
"FirstLine": 430,
"LineCount": 35
}Results: {
"Contents": " 430:\t\tstruct sock *sk = subflow-\u003econn;\n 431:\t\n 432:\t\t/* mptcp_mp_fail_no_response() can reach here on an already closed\n 433:\t\t * socket\n 434:\t\t */\n 435:\t\tif (ssk-\u003esk_state == TCP_CLOSE)\n 436:\t\t\treturn;\n 437:\t\n 438:\t\t/* must hold: tcp_done() could drop last reference on parent */\n 439:\t\tsock_hold(sk);\n 440:\t\n 441:\t\tsubflow-\u003eresetting = 1;\n 442:\t\tmptcp_send_active_reset_reason(ssk);\n 443:\t\ttcp_done(ssk);\n 444:\t\tif (!test_and_set_bit(MPTCP_WORK_CLOSE_SUBFLOW, \u0026mptcp_sk(sk)-\u003eflags))\n 445:\t\t\tmptcp_schedule_work(sk);\n 446:\t\n 447:\t\tsock_put(sk);\n 448:\t}\n 449:\t\n 450:\tstatic bool subflow_use_different_dport(struct mptcp_sock *msk, const struct sock *sk)\n 451:\t{\n 452:\t\treturn inet_sk(sk)-\u003einet_dport != inet_sk((struct sock *)msk)-\u003einet_dport;\n 453:\t}\n 454:\t\n 455:\tvoid __mptcp_sync_state(struct sock *sk, int state)\n 456:\t{\n 457:\t\tstruct mptcp_subflow_context *subflow;\n 458:\t\tstruct mptcp_sock *msk = mptcp_sk(sk);\n 459:\t\tstruct sock *ssk = msk-\u003efirst;\n 460:\t\n 461:\t\tsubflow = mptcp_subflow_ctx(ssk);\n 462:\t\t__mptcp_propagate_sndbuf(sk, ssk);\n 463:\t\n 464:\t\tif (sk-\u003esk_state == TCP_SYN_SENT) {\n"
} |
| 45/3 | 2026/09/17 10:15 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 12191 output: 39 thoughts: 20 Thoughts: Here's my take on those thoughts: **Analyzing `subflow_state_change` After an Early Exit** Okay, so we've identified a spot where the main execution flow might return early. That immediately flags a question in my mind: what happens with the `subflow_state_change` function in that scenario? We need to be absolutely sure that even if we exit prematurely, any state management related to subflows is handled correctly. I need to understand if this early return bypasses some crucial `subflow_state_change` calls, potentially leaving things in an inconsistent state, or if this function is robust enough to handle these abrupt interruptions. This isn't just a coding detail; it's about the overall system's reliability and resilience. I need to dig into the `subflow_state_change`'s internal logic and how it interacts with the return path to confirm this. My understanding needs to be complete on this point to ensure state transitions are valid. |
| 46/3 | 2026/09/17 10:15 | tool | read-file |
0mArgs:{
"File": "net/mptcp/subflow.c",
"FirstLine": 1880,
"LineCount": 45
}Results: {
"Contents": "1880:\tstatic void subflow_state_change(struct sock *sk)\n1881:\t{\n1882:\t\tstruct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);\n1883:\t\tstruct sock *parent = subflow-\u003econn;\n1884:\t\n1885:\t\t__subflow_state_change(sk);\n1886:\t\n1887:\t\t/* Rx queue processing is unneeded, error reporting will take place at\n1888:\t\t * __mptcp_close_ssk() time and subflow reset can't happen in case of\n1889:\t\t * fallback: subflow_sched_work_if_closed() would be a no-op.\n1890:\t\t */\n1891:\t\tif (subflow-\u003eresetting)\n1892:\t\t\treturn;\n1893:\t\n1894:\t\t/* as recvmsg() does not acquire the subflow socket for ssk selection\n1895:\t\t * a fin packet carrying a DSS can be unnoticed if we don't trigger\n1896:\t\t * the data available machinery here.\n1897:\t\t */\n1898:\t\tif (mptcp_subflow_data_available(sk))\n1899:\t\t\tmptcp_data_ready(parent, sk);\n1900:\t\telse if (unlikely(sk-\u003esk_err))\n1901:\t\t\tsubflow_error_report(sk);\n1902:\t\n1903:\t\tsubflow_sched_work_if_closed(mptcp_sk(parent), sk);\n1904:\t}\n1905:\t\n1906:\tvoid mptcp_subflow_queue_clean(struct sock *listener_sk, struct sock *listener_ssk)\n1907:\t{\n1908:\t\tstruct request_sock_queue *queue = \u0026inet_csk(listener_ssk)-\u003eicsk_accept_queue;\n1909:\t\tstruct request_sock *req, *head, *tail;\n1910:\t\tstruct mptcp_subflow_context *subflow;\n1911:\t\tstruct sock *sk, *ssk;\n1912:\t\n1913:\t\t/* Due to lock dependencies no relevant lock can be acquired under rskq_lock.\n1914:\t\t * Splice the req list, so that accept() can not reach the pending ssk after\n1915:\t\t * the listener socket is released below.\n1916:\t\t */\n1917:\t\tspin_lock_bh(\u0026queue-\u003erskq_lock);\n1918:\t\thead = queue-\u003erskq_accept_head;\n1919:\t\ttail = queue-\u003erskq_accept_tail;\n1920:\t\tqueue-\u003erskq_accept_head = NULL;\n1921:\t\tqueue-\u003erskq_accept_tail = NULL;\n1922:\t\tspin_unlock_bh(\u0026queue-\u003erskq_lock);\n1923:\t\n1924:\t\tif (!head)\n"
} |
| 47/3 | 2026/09/17 10:15 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 13234 output: 33 thoughts: 379 Thoughts: **Analyzing a Kernel Patch: Potential for Uninitialized Memory** Okay, let's break this down. First, I need to understand the *why* behind this patch. Ideally, I'd have a commit log to reference, but since that's not available, I'll need to reconstruct the purpose from the code itself. Looking at the code, it's clear we have two main areas of concern: `mptcp_push_release` and `subflow_state_change`. In `mptcp_push_release`, the key change is an `if (info->mss_now)` check before calling `tcp_push`. So, they're explicitly preventing a call to `tcp_push` if `mss_now` is zero. A possible optimization, perhaps a defensive measure against some edge case? Let's keep that in mind. The second part, `subflow_state_change`, is more interesting. There's a check for `subflow->resetting`. If this flag is set, the function returns early, bypassing some key routines like `mptcp_subflow_data_available`, `subflow_error_report`, and `subflow_sched_work_if_closed`. This means that when a subflow is being reset by `mptcp_subflow_reset`, some critical functions are skipped. The patch is probably trying to handle a reset condition. I need to understand what state this `resetting` flag represents and the order of operations here. Now, the critical question: Does this introduce any potential for uninitialized memory to be exposed? That's what I really need to focus on. My expertise here makes me think about it from the point of view of exposing kernel memory to user space. Let's see. The patch itself doesn't explicitly send anything to user space. `mptcp_push_release` simply calls or doesn't call `tcp_push` and releases `ssk`. As for `subflow->resetting`, that's just an internal bitfield within `struct mptcp_subflow_context`. The real question is whether any of the structures are ever copied to user space. Is `struct mptcp_subflow_context` exposed to the user space? I'll need to investigate that part further. I need to see if there is any place the code *does* copy this struct to user space, in order to make a proper judgement about the vulnerability. |
| 48/3 | 2026/09/17 10:15 | tool | grepper |
0mArgs:{
"Expression": "mptcp_subflow_context",
"PathPrefix": "net/mptcp"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 945 lines.\nUse more precise expression if possible.\n\nnet/mptcp/ctrl.c=533=void mptcp_active_detect_blackhole(struct sock *ssk, bool expired)\nnet/mptcp/ctrl.c-534-{\nnet/mptcp/ctrl.c:535:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/ctrl.c-536-\tu8 timeouts, to_max;\n--\nnet/mptcp/diag.c=15=static int subflow_get_info(struct sock *sk, struct sk_buff *skb, bool net_admin)\nnet/mptcp/diag.c-16-{\nnet/mptcp/diag.c:17:\tstruct mptcp_subflow_context *sf;\nnet/mptcp/diag.c-18-\tstruct nlattr *start;\n--\nnet/mptcp/fastopen.c-8-\nnet/mptcp/fastopen.c:9:void mptcp_fastopen_subflow_synack_set_params(struct mptcp_subflow_context *subflow,\nnet/mptcp/fastopen.c-10-\t\t\t\t\t struct request_sock *req)\n--\nnet/mptcp/mptcp_diag.c=75=static void mptcp_diag_dump_listeners(struct sk_buff *skb, struct netlink_callback *cb,\n--\nnet/mptcp/mptcp_diag.c-96-\t\tsk_nulls_for_each(sk, node, \u0026ilb-\u003enulls_head) {\nnet/mptcp/mptcp_diag.c:97:\t\t\tconst struct mptcp_subflow_context *ctx = mptcp_subflow_ctx(sk);\nnet/mptcp/mptcp_diag.c-98-\t\t\tstruct inet_sock *inet = inet_sk(sk);\n--\nnet/mptcp/options.c=465=bool mptcp_syn_options(struct sock *sk, const struct sk_buff *skb,\n--\nnet/mptcp/options.c-467-{\nnet/mptcp/options.c:468:\tstruct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);\nnet/mptcp/options.c-469-\n--\nnet/mptcp/options.c=513=static bool mptcp_established_options_mp(struct sock *sk, struct sk_buff *skb,\n--\nnet/mptcp/options.c-516-{\nnet/mptcp/options.c:517:\tstruct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);\nnet/mptcp/options.c-518-\tstruct mptcp_sock *msk = mptcp_sk(subflow-\u003econn);\n--\nnet/mptcp/options.c-596-\nnet/mptcp/options.c:597:static void mptcp_write_data_fin(struct mptcp_subflow_context *subflow,\nnet/mptcp/options.c-598-\t\t\t\t struct sk_buff *skb, struct mptcp_ext *ext)\n--\nnet/mptcp/options.c=626=static bool mptcp_established_options_dss(struct sock *sk, struct sk_buff *skb,\n--\nnet/mptcp/options.c-629-{\nnet/mptcp/options.c:630:\tstruct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);\nnet/mptcp/options.c-631-\tstruct mptcp_sock *msk = mptcp_sk(subflow-\u003econn);\n--\nnet/mptcp/options.c=721=static bool mptcp_established_options_add_addr(struct sock *sk,\n--\nnet/mptcp/options.c-726-{\nnet/mptcp/options.c:727:\tstruct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);\nnet/mptcp/options.c-728-\tstruct mptcp_sock *msk = mptcp_sk(subflow-\u003econn);\n--\nnet/mptcp/options.c=762=static bool mptcp_established_options_rm_addr(struct sock *sk, int *size,\n--\nnet/mptcp/options.c-765-{\nnet/mptcp/options.c:766:\tstruct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);\nnet/mptcp/options.c-767-\tstruct mptcp_sock *msk = mptcp_sk(subflow-\u003econn);\n--\nnet/mptcp/options.c=784=static bool mptcp_established_options_mp_prio(struct sock *sk, int *size,\n--\nnet/mptcp/options.c-787-{\nnet/mptcp/options.c:788:\tstruct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);\nnet/mptcp/options.c-789-\n--\nnet/mptcp/options.c=809=static noinline bool mptcp_established_options_rst(struct sock *sk,\n--\nnet/mptcp/options.c-813-{\nnet/mptcp/options.c:814:\tconst struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);\nnet/mptcp/options.c-815-\n--\nnet/mptcp/options.c=828=static bool mptcp_established_options_fastclose(struct sock *sk, int *size,\n--\nnet/mptcp/options.c-831-{\nnet/mptcp/options.c:832:\tstruct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);\nnet/mptcp/options.c-833-\tstruct mptcp_sock *msk = mptcp_sk(subflow-\u003econn);\n--\nnet/mptcp/options.c=850=static bool mptcp_established_options_mp_fail(struct sock *sk, int *size,\n--\nnet/mptcp/options.c-853-{\nnet/mptcp/options.c:854:\tstruct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);\nnet/mptcp/options.c-855-\n--\nnet/mptcp/options.c=872=int mptcp_established_options(struct sock *sk, struct sk_buff *skb,\n--\nnet/mptcp/options.c-875-{\nnet/mptcp/options.c:876:\tstruct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);\nnet/mptcp/options.c-877-\tstruct mptcp_sock *msk = mptcp_sk(subflow-\u003econn);\n--\nnet/mptcp/options.c=977=static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk,\nnet/mptcp/options.c:978:\t\t\t\t struct mptcp_subflow_context *subflow,\nnet/mptcp/options.c-979-\t\t\t\t struct sk_buff *skb,\n--\nnet/mptcp/options.c=1092=static void rwin_update(struct mptcp_sock *msk, struct sock *ssk,\n--\nnet/mptcp/options.c-1094-{\nnet/mptcp/options.c:1095:\tstruct mptcp_subflow_context *subflow = mptcp_subflow_ctx(ssk);\nnet/mptcp/options.c-1096-\tstruct tcp_sock *tp = tcp_sk(ssk);\n--\nnet/mptcp/options.c=1224=bool mptcp_incoming_options(struct sock *sk, struct sk_buff *skb)\nnet/mptcp/options.c-1225-{\nnet/mptcp/options.c:1226:\tstruct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);\nnet/mptcp/options.c-1227-\tstruct mptcp_sock *msk = mptcp_sk(subflow-\u003econn);\n--\nnet/mptcp/options.c=1423=static void mptcp_track_rwin(struct tcp_sock *tp)\n--\nnet/mptcp/options.c-1425-\tconst struct sock *ssk = (const struct sock *)tp;\nnet/mptcp/options.c:1426:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/options.c-1427-\tstruct mptcp_sock *msk;\n--\nnet/mptcp/options.c=1472=void mptcp_write_options(struct tcphdr *th, __be32 *ptr, struct tcp_sock *tp,\n--\nnet/mptcp/options.c-1475-\tconst struct sock *ssk = (const struct sock *)tp;\nnet/mptcp/options.c:1476:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/options.c-1477-\n--\nnet/mptcp/pm.c=118=bool mptcp_pm_has_subflow_saddr(const struct mptcp_sock *msk,\n--\nnet/mptcp/pm.c-120-{\nnet/mptcp/pm.c:121:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/pm.c-122-\tstruct mptcp_addr_info cur;\n--\nnet/mptcp/pm.c=220=static void __mptcp_pm_send_ack(struct mptcp_sock *msk,\nnet/mptcp/pm.c:221:\t\t\t\tstruct mptcp_subflow_context *subflow,\nnet/mptcp/pm.c-222-\t\t\t\tbool prio, bool backup)\n--\nnet/mptcp/pm.c=241=void mptcp_pm_send_ack(struct mptcp_sock *msk,\nnet/mptcp/pm.c:242:\t\t struct mptcp_subflow_context *subflow,\nnet/mptcp/pm.c-243-\t\t bool prio, bool backup)\n--\nnet/mptcp/pm.c-249-\nnet/mptcp/pm.c:250:static bool subflow_in_rm_list(const struct mptcp_subflow_context *subflow,\nnet/mptcp/pm.c-251-\t\t\t const struct mptcp_rm_list *rm_list)\n--\nnet/mptcp/pm.c=265=mptcp_pm_addr_send_ack_avoid_list(struct mptcp_sock *msk,\n--\nnet/mptcp/pm.c-267-{\nnet/mptcp/pm.c:268:\tstruct mptcp_subflow_context *subflow, *stale = NULL, *same_id = NULL;\nnet/mptcp/pm.c-269-\n--\nnet/mptcp/pm.c=309=int mptcp_pm_mp_prio_send_ack(struct mptcp_sock *msk,\n--\nnet/mptcp/pm.c-313-{\nnet/mptcp/pm.c:314:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/pm.c-315-\n--\nnet/mptcp/pm.c=342=static unsigned int mptcp_adjust_add_addr_timeout(struct mptcp_sock *msk)\n--\nnet/mptcp/pm.c-345-\tunsigned int rto = mptcp_get_add_addr_timeout(net);\nnet/mptcp/pm.c:346:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/pm.c-347-\tunsigned int max = 0, max_stale = 0;\n--\nnet/mptcp/pm.c=662=void mptcp_pm_subflow_check_next(struct mptcp_sock *msk,\nnet/mptcp/pm.c:663:\t\t\t\t const struct mptcp_subflow_context *subflow)\nnet/mptcp/pm.c-664-{\n--\nnet/mptcp/pm.c=697=void mptcp_pm_add_addr_received(const struct sock *ssk,\n--\nnet/mptcp/pm.c-699-{\nnet/mptcp/pm.c:700:\tstruct mptcp_subflow_context *subflow = mptcp_subflow_ctx(ssk);\nnet/mptcp/pm.c-701-\tstruct mptcp_sock *msk = mptcp_sk(subflow-\u003econn);\n--\nnet/mptcp/pm.c=765=static void mptcp_pm_rm_addr_or_subflow(struct mptcp_sock *msk,\n--\nnet/mptcp/pm.c-768-{\nnet/mptcp/pm.c:769:\tstruct mptcp_subflow_context *subflow, *tmp;\nnet/mptcp/pm.c-770-\tstruct sock *sk = (struct sock *)msk;\n--\nnet/mptcp/pm.c=858=void mptcp_pm_mp_prio_received(struct sock *ssk, u8 bkup)\nnet/mptcp/pm.c-859-{\nnet/mptcp/pm.c:860:\tstruct mptcp_subflow_context *subflow = mptcp_subflow_ctx(ssk);\nnet/mptcp/pm.c-861-\tstruct sock *sk = subflow-\u003econn;\n--\nnet/mptcp/pm.c=872=void mptcp_pm_mp_fail_received(struct sock *sk, u64 fail_seq)\nnet/mptcp/pm.c-873-{\nnet/mptcp/pm.c:874:\tstruct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);\nnet/mptcp/pm.c-875-\tstruct mptcp_sock *msk = mptcp_sk(subflow-\u003econn);\n--\nnet/mptcp/pm.c=1070=mptcp_pm_subflow_chk_stale(const struct mptcp_sock *msk, struct sock *ssk)\nnet/mptcp/pm.c-1071-{\nnet/mptcp/pm.c:1072:\tstruct mptcp_subflow_context *iter, *subflow = mptcp_subflow_ctx(ssk);\nnet/mptcp/pm.c-1073-\tstruct sock *sk = (struct sock *)msk;\n--\nnet/mptcp/pm.c=1107=void mptcp_pm_chk_stale(const struct mptcp_sock *msk)\nnet/mptcp/pm.c-1108-{\nnet/mptcp/pm.c:1109:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/pm.c-1110-\n--\nnet/mptcp/pm_kernel.c=99=static bool has_subflow_daddr(const struct mptcp_sock *msk,\n--\nnet/mptcp/pm_kernel.c-101-{\nnet/mptcp/pm_kernel.c:102:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/pm_kernel.c-103-\tstruct mptcp_addr_info cur;\n--\nnet/mptcp/pm_kernel.c=203=fill_remote_addresses_fullmesh(struct mptcp_sock *msk,\n--\nnet/mptcp/pm_kernel.c-211-\tstruct sock *sk = (struct sock *)msk, *ssk;\nnet/mptcp/pm_kernel.c:212:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/pm_kernel.c-213-\tint i = 0;\n--\nnet/mptcp/pm_kernel.c=300=static void mptcp_mpc_endpoint_setup(struct mptcp_sock *msk)\nnet/mptcp/pm_kernel.c-301-{\nnet/mptcp/pm_kernel.c:302:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/pm_kernel.c-303-\tstruct mptcp_pm_addr_entry *entry;\n--\nnet/mptcp/pm_kernel.c=507=fill_local_laminar_endp(struct mptcp_sock *msk, struct mptcp_addr_info *remote,\n--\nnet/mptcp/pm_kernel.c-511-\tDECLARE_BITMAP(unavail_id, MPTCP_PM_MAX_ADDR_ID + 1);\nnet/mptcp/pm_kernel.c:512:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/pm_kernel.c-513-\tstruct sock *sk = (struct sock *)msk;\n--\nnet/mptcp/pm_netlink.c=298=static int mptcp_event_add_subflow(struct sk_buff *skb, const struct sock *ssk)\n--\nnet/mptcp/pm_netlink.c-300-\tconst struct inet_sock *issk = inet_sk(ssk);\nnet/mptcp/pm_netlink.c:301:\tconst struct mptcp_subflow_context *sf;\nnet/mptcp/pm_netlink.c-302-\n--\nnet/mptcp/pm_netlink.c=345=static int mptcp_event_put_token_and_ssk(struct sk_buff *skb,\n--\nnet/mptcp/pm_netlink.c-349-\tconst struct sock *sk = (const struct sock *)msk;\nnet/mptcp/pm_netlink.c:350:\tconst struct mptcp_subflow_context *sf;\nnet/mptcp/pm_netlink.c-351-\tu8 sk_err;\n--\nnet/mptcp/pm_netlink.c=385=static int mptcp_event_sub_closed(struct sk_buff *skb,\n--\nnet/mptcp/pm_netlink.c-388-{\nnet/mptcp/pm_netlink.c:389:\tconst struct mptcp_subflow_context *sf;\nnet/mptcp/pm_netlink.c-390-\n--\nnet/mptcp/pm_netlink.c=465=void mptcp_event_addr_announced(const struct sock *ssk,\n--\nnet/mptcp/pm_netlink.c-467-{\nnet/mptcp/pm_netlink.c:468:\tstruct mptcp_subflow_context *subflow = mptcp_subflow_ctx(ssk);\nnet/mptcp/pm_netlink.c-469-\tstruct mptcp_sock *msk = mptcp_sk(subflow-\u003econn);\n--\nnet/mptcp/pm_userspace.c=263=static int mptcp_userspace_pm_remove_id_zero_address(struct mptcp_sock *msk)\n--\nnet/mptcp/pm_userspace.c-265-\tstruct mptcp_rm_list list = { .nr = 0 };\nnet/mptcp/pm_userspace.c:266:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/pm_userspace.c-267-\tstruct sock *sk = (struct sock *)msk;\n--\nnet/mptcp/pm_userspace.c=450=static struct sock *mptcp_nl_find_ssk(struct mptcp_sock *msk,\n--\nnet/mptcp/pm_userspace.c-453-{\nnet/mptcp/pm_userspace.c:454:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/pm_userspace.c-455-\n--\nnet/mptcp/protocol.c=104=static int __mptcp_socket_create(struct mptcp_sock *msk)\nnet/mptcp/protocol.c-105-{\nnet/mptcp/protocol.c:106:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/protocol.c-107-\tstruct sock *sk = (struct sock *)msk;\n--\nnet/mptcp/protocol.c=426=static void mptcp_init_skb(struct sock *ssk, struct sk_buff *skb, int offset,\n--\nnet/mptcp/protocol.c-428-{\nnet/mptcp/protocol.c:429:\tstruct mptcp_subflow_context *subflow = mptcp_subflow_ctx(ssk);\nnet/mptcp/protocol.c-430-\tbool has_rxtstamp = TCP_SKB_CB(skb)-\u003ehas_rxtstamp;\n--\nnet/mptcp/protocol.c=514=static void mptcp_shutdown_subflows(struct mptcp_sock *msk)\nnet/mptcp/protocol.c-515-{\nnet/mptcp/protocol.c:516:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/protocol.c-517-\n--\nnet/mptcp/protocol.c=598=static void __mptcp_set_timeout(struct sock *sk, long tout)\n--\nnet/mptcp/protocol.c-603-\nnet/mptcp/protocol.c:604:static long mptcp_timeout_from_subflow(const struct mptcp_subflow_context *subflow)\nnet/mptcp/protocol.c-605-{\n--\nnet/mptcp/protocol.c=612=static void mptcp_set_timeout(struct sock *sk)\nnet/mptcp/protocol.c-613-{\nnet/mptcp/protocol.c:614:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/protocol.c-615-\tlong tout = 0;\n--\nnet/mptcp/protocol.c=643=static void mptcp_send_ack(struct mptcp_sock *msk)\nnet/mptcp/protocol.c-644-{\nnet/mptcp/protocol.c:645:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/protocol.c-646-\n--\nnet/mptcp/protocol.c=674=static void mptcp_cleanup_rbuf(struct mptcp_sock *msk, int copied)\n--\nnet/mptcp/protocol.c-676-\tint old_space = READ_ONCE(msk-\u003eold_wspace);\nnet/mptcp/protocol.c:677:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/protocol.c-678-\tstruct sock *sk = (struct sock *)msk;\n--\nnet/mptcp/protocol.c=749=static void __mptcp_add_backlog(struct sock *sk,\nnet/mptcp/protocol.c:750:\t\t\t\tstruct mptcp_subflow_context *subflow,\nnet/mptcp/protocol.c-751-\t\t\t\tstruct sk_buff *skb)\n--\nnet/mptcp/protocol.c=802=static bool __mptcp_move_skbs_from_subflow(struct mptcp_sock *msk,\n--\nnet/mptcp/protocol.c-804-{\nnet/mptcp/protocol.c:805:\tstruct mptcp_subflow_context *subflow = mptcp_subflow_ctx(ssk);\nnet/mptcp/protocol.c-806-\tstruct sock *sk = (struct sock *)msk;\n--\nnet/mptcp/protocol.c=953=void __mptcp_error_report(struct sock *sk)\nnet/mptcp/protocol.c-954-{\nnet/mptcp/protocol.c:955:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/protocol.c-956-\tstruct mptcp_sock *msk = mptcp_sk(sk);\n--\nnet/mptcp/protocol.c=986=static void mptcp_rcv_rtt_update(struct mptcp_sock *msk,\nnet/mptcp/protocol.c:987:\t\t\t\t struct mptcp_subflow_context *subflow)\nnet/mptcp/protocol.c-988-{\n--\nnet/mptcp/protocol.c=1012=void mptcp_data_ready(struct sock *sk, struct sock *ssk)\nnet/mptcp/protocol.c-1013-{\nnet/mptcp/protocol.c:1014:\tstruct mptcp_subflow_context *subflow = mptcp_subflow_ctx(ssk);\nnet/mptcp/protocol.c-1015-\tstruct mptcp_sock *msk = mptcp_sk(sk);\n--\nnet/mptcp/protocol.c=1065=static void __mptcp_flush_join_list(struct sock *sk, struct list_head *join_list)\nnet/mptcp/protocol.c-1066-{\nnet/mptcp/protocol.c:1067:\tstruct mptcp_subflow_context *tmp, *subflow;\nnet/mptcp/protocol.c-1068-\tstruct mptcp_sock *msk = mptcp_sk(sk);\n--\nnet/mptcp/protocol.c=1230=static void mptcp_enter_memory_pressure(struct sock *sk)\nnet/mptcp/protocol.c-1231-{\nnet/mptcp/protocol.c:1232:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/protocol.c-1233-\tstruct mptcp_sock *msk = mptcp_sk(sk);\n--\nnet/mptcp/protocol.c=1554=struct subflow_send_info {\n--\nnet/mptcp/protocol.c-1558-\nnet/mptcp/protocol.c:1559:void mptcp_subflow_set_active(struct mptcp_subflow_context *subflow)\nnet/mptcp/protocol.c-1560-{\n--\nnet/mptcp/protocol.c-1567-\nnet/mptcp/protocol.c:1568:bool mptcp_subflow_active(struct mptcp_subflow_context *subflow)\nnet/mptcp/protocol.c-1569-{\n--\nnet/mptcp/protocol.c=1589=struct sock *mptcp_subflow_get_send(struct mptcp_sock *msk)\n--\nnet/mptcp/protocol.c-1591-\tstruct subflow_send_info send_info[SSK_MODE_MAX];\nnet/mptcp/protocol.c:1592:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/protocol.c-1593-\tstruct sock *sk = (struct sock *)msk;\n--\nnet/mptcp/protocol.c=1753=void __mptcp_push_pending(struct sock *sk, unsigned int flags)\n--\nnet/mptcp/protocol.c-1763-\twhile (mptcp_send_head(sk) \u0026\u0026 (push_count \u003e 0)) {\nnet/mptcp/protocol.c:1764:\t\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/protocol.c-1765-\t\tint ret = 0;\n--\nnet/mptcp/protocol.c=1821=static void __mptcp_subflow_push_pending(struct sock *sk, struct sock *ssk, bool first)\n--\nnet/mptcp/protocol.c-1832-\twhile (mptcp_send_head(sk) \u0026\u0026 keep_pushing) {\nnet/mptcp/protocol.c:1833:\t\tstruct mptcp_subflow_context *subflow = mptcp_subflow_ctx(ssk);\nnet/mptcp/protocol.c-1834-\t\tint ret = 0;\n--\nnet/mptcp/protocol.c=1984=static void mptcp_rps_record_subflows(const struct mptcp_sock *msk)\nnet/mptcp/protocol.c-1985-{\nnet/mptcp/protocol.c:1986:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/protocol.c-1987-\n--\nnet/mptcp/protocol.c=2238=static void mptcp_rcv_space_adjust(struct mptcp_sock *msk, int copied)\nnet/mptcp/protocol.c-2239-{\nnet/mptcp/protocol.c:2240:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/protocol.c-2241-\tstruct sock *sk = (struct sock *)msk;\n--\nnet/mptcp/protocol.c=2523=struct sock *mptcp_subflow_get_retrans(struct mptcp_sock *msk)\n--\nnet/mptcp/protocol.c-2525-\tstruct sock *backup = NULL, *pick = NULL;\nnet/mptcp/protocol.c:2526:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/protocol.c-2527-\tint min_stale_count = INT_MAX;\n--\nnet/mptcp/protocol.c=2602=static void __mptcp_subflow_disconnect(struct sock *ssk,\nnet/mptcp/protocol.c:2603:\t\t\t\t struct mptcp_subflow_context *subflow,\nnet/mptcp/protocol.c-2604-\t\t\t\t bool fastclosing)\n--\nnet/mptcp/protocol.c=2642=static void __mptcp_close_ssk(struct sock *sk, struct sock *ssk,\nnet/mptcp/protocol.c:2643:\t\t\t struct mptcp_subflow_context *subflow,\nnet/mptcp/protocol.c-2644-\t\t\t unsigned int flags)\n--\nnet/mptcp/protocol.c=2748=void mptcp_close_ssk(struct sock *sk, struct sock *ssk,\nnet/mptcp/protocol.c:2749:\t\t struct mptcp_subflow_context *subflow)\nnet/mptcp/protocol.c-2750-{\n--\nnet/mptcp/protocol.c=2773=static void __mptcp_close_subflow(struct sock *sk)\nnet/mptcp/protocol.c-2774-{\nnet/mptcp/protocol.c:2775:\tstruct mptcp_subflow_context *subflow, *tmp;\nnet/mptcp/protocol.c-2776-\tstruct mptcp_sock *msk = mptcp_sk(sk);\n--\nnet/mptcp/protocol.c=2809=static void mptcp_check_fastclose(struct mptcp_sock *msk)\nnet/mptcp/protocol.c-2810-{\nnet/mptcp/protocol.c:2811:\tstruct mptcp_subflow_context *subflow, *tmp;\nnet/mptcp/protocol.c-2812-\tstruct sock *sk = (struct sock *)msk;\n--\nnet/mptcp/protocol.c=2862=static int __mptcp_push_retrans(struct sock *sk, struct mptcp_data_frag *dfrag,\n--\nnet/mptcp/protocol.c-2866-\tstruct mptcp_sock *msk = mptcp_sk(sk);\nnet/mptcp/protocol.c:2867:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/protocol.c-2868-\tstruct sock *ssk;\n--\nnet/mptcp/protocol.c=2924=static void __mptcp_retrans(struct sock *sk)\n--\nnet/mptcp/protocol.c-2926-\tstruct mptcp_sock *msk = mptcp_sk(sk);\nnet/mptcp/protocol.c:2927:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/protocol.c-2928-\tstruct mptcp_data_frag *dfrag;\n--\nnet/mptcp/protocol.c=3087=static void mptcp_do_fastclose(struct sock *sk)\nnet/mptcp/protocol.c-3088-{\nnet/mptcp/protocol.c:3089:\tstruct mptcp_subflow_context *subflow, *tmp;\nnet/mptcp/protocol.c-3090-\tstruct mptcp_sock *msk = mptcp_sk(sk);\n--\nnet/mptcp/protocol.c=3122=static void mptcp_worker(struct work_struct *work)\n--\nnet/mptcp/protocol.c-3145-\tif (mptcp_close_tout_expired(sk)) {\nnet/mptcp/protocol.c:3146:\t\tstruct mptcp_subflow_context *subflow, *tmp;\nnet/mptcp/protocol.c-3147-\n--\nnet/mptcp/protocol.c=3368=static void mptcp_check_send_data_fin(struct sock *sk)\nnet/mptcp/protocol.c-3369-{\nnet/mptcp/protocol.c:3370:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/protocol.c-3371-\tstruct mptcp_sock *msk = mptcp_sk(sk);\n--\nnet/mptcp/protocol.c=3461=bool __mptcp_close(struct sock *sk, long timeout)\nnet/mptcp/protocol.c-3462-{\nnet/mptcp/protocol.c:3463:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/protocol.c-3464-\tstruct mptcp_sock *msk = mptcp_sk(sk);\n--\nnet/mptcp/protocol.c=3569=static void mptcp_destroy_common(struct mptcp_sock *msk)\nnet/mptcp/protocol.c-3570-{\nnet/mptcp/protocol.c:3571:\tstruct mptcp_subflow_context *subflow, *tmp;\nnet/mptcp/protocol.c-3572-\tstruct sock *sk = (struct sock *)msk;\n--\nnet/mptcp/protocol.c=3708=struct sock *mptcp_sk_clone_init(const struct sock *sk,\n--\nnet/mptcp/protocol.c-3714-\tstruct sock *nsk = sk_clone_lock(sk, GFP_ATOMIC);\nnet/mptcp/protocol.c:3715:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/protocol.c-3716-\tstruct mptcp_sock *msk;\n--\nnet/mptcp/protocol.c=3907=void mptcp_subflow_process_delegated(struct sock *ssk, long status)\nnet/mptcp/protocol.c-3908-{\nnet/mptcp/protocol.c:3909:\tstruct mptcp_subflow_context *subflow = mptcp_subflow_ctx(ssk);\nnet/mptcp/protocol.c-3910-\tstruct sock *sk = subflow-\u003econn;\n--\nnet/mptcp/protocol.c=3957=void mptcp_finish_connect(struct sock *ssk)\nnet/mptcp/protocol.c-3958-{\nnet/mptcp/protocol.c:3959:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/protocol.c-3960-\tstruct mptcp_sock *msk;\n--\nnet/mptcp/protocol.c=4006=bool mptcp_finish_join(struct sock *ssk)\nnet/mptcp/protocol.c-4007-{\nnet/mptcp/protocol.c:4008:\tstruct mptcp_subflow_context *subflow = mptcp_subflow_ctx(ssk);\nnet/mptcp/protocol.c-4009-\tstruct mptcp_sock *msk = mptcp_sk(subflow-\u003econn);\n--\nnet/mptcp/protocol.c=4145=static int mptcp_connect(struct sock *sk, struct sockaddr_unsized *uaddr,\n--\nnet/mptcp/protocol.c-4147-{\nnet/mptcp/protocol.c:4148:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/protocol.c-4149-\tstruct mptcp_sock *msk = mptcp_sk(sk);\n--\nnet/mptcp/protocol.c=4325=static void mptcp_graft_subflows(struct sock *sk)\nnet/mptcp/protocol.c-4326-{\nnet/mptcp/protocol.c:4327:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/protocol.c-4328-\tstruct mptcp_sock *msk = mptcp_sk(sk);\n--\nnet/mptcp/protocol.c=4388=static int mptcp_stream_accept(struct socket *sock, struct socket *newsock,\n--\nnet/mptcp/protocol.c-4409-\tif (sk_is_mptcp(newsk)) {\nnet/mptcp/protocol.c:4410:\t\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/protocol.c-4411-\t\tstruct sock *new_mptcp_sock;\n--\nnet/mptcp/protocol.c=4758=static int mptcp_napi_poll(struct napi_struct *napi, int budget)\n--\nnet/mptcp/protocol.c-4760-\tstruct mptcp_delegated_action *delegated;\nnet/mptcp/protocol.c:4761:\tstruct mptcp_subflow_context *subflow;\nnet/mptcp/protocol.c-4762-\tint work_done = 0;\n--\nnet/mptcp/protocol.h=536=DECLARE_PER_CPU(struct mptcp_delegated_action, mptcp_delegated_actions);\n--\nnet/mptcp/protocol.h-544-/* MPTCP subflow context */\nnet/mptcp/protocol.h:545:struct mptcp_subflow_context {\nnet/mptcp/protocol.h-546-\tstruct\tlist_head node;/* conn_list of subflows */\n--\nnet/mptcp/protocol.h-637-\nnet/mptcp/protocol.h:638:static inline struct mptcp_subflow_context *\nnet/mptcp/protocol.h-639-mptcp_subflow_ctx(const struct sock *sk)\n--\nnet/mptcp/protocol.h-643-\t/* Use RCU on icsk_ulp_data only for sock diag code */\nnet/mptcp/protocol.h:644:\treturn (__force struct mptcp_subflow_context *)icsk-\u003eicsk_ulp_data;\nnet/mptcp/protocol.h-645-}\n--\nnet/mptcp/protocol.h=647=static inline struct sock *\nnet/mptcp/protocol.h:648:mptcp_subflow_tcp_sock(const struct mptcp_subflow_context *subflow)\nnet/mptcp/protocol.h-649-{\n--\nnet/mptcp/protocol.h=653=static inline void\nnet/mptcp/protocol.h:654:mptcp_subflow_ctx_reset(struct mptcp_subflow_context *subflow)\nnet/mptcp/protocol.h-655-{\n--\nnet/mptcp/protocol.h=689=mptcp_send_active_reset_reason(struct sock *sk)\nnet/mptcp/protocol.h-690-{\nnet/mptcp/protocol.h:691:\tstruct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);\nnet/mptcp/protocol.h-692-\tenum sk_rst_reason reason;\n--\nnet/mptcp/protocol.h=718=static inline void\nnet/mptcp/protocol.h:719:__mptcp_subflow_lend_fwdmem(struct mptcp_subflow_context *subflow, int size)\nnet/mptcp/protocol.h-720-{\n--\nnet/mptcp/protocol.h=726=static inline void\nnet/mptcp/protocol.h:727:mptcp_subflow_lend_fwdmem(struct mptcp_subflow_context *subflow,\nnet/mptcp/protocol.h-728-\t\t\t struct sk_buff *skb)\n--\nnet/mptcp/protocol.h=734=static inline u64\nnet/mptcp/protocol.h:735:mptcp_subflow_get_map_offset(const struct mptcp_subflow_context *subflow)\nnet/mptcp/protocol.h-736-{\n\n"
} |
| 49/3 | 2026/09/17 10:15 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 25073 output: 36 thoughts: 36 Thoughts: Here's my summary, as if I were thinking these thoughts: **Analyzing `subflow_get_info` in `net/mptcp/diag.c`** Okay, I'm going to take a quick look at `subflow_get_info` in `net/mptcp/diag.c`. My primary interest here is in data transfer. I want to see what information is being copied out to userspace through the diagnostic interface. We need to be very precise about this, so I will scrutinize the data structures and the copying mechanisms closely. I need to understand what specific subflow details are exposed and if there are any potential vulnerabilities, performance considerations or privacy concerns with the data being provided. I'll need to confirm that no unexpected sensitive information is included and if the data is presented in a well-defined and controlled format for the diagnostic tools. Let's dig in and see exactly what's going on. |
| 50/3 | 2026/09/17 10:15 | tool | read-file |
0mArgs:{
"File": "net/mptcp/diag.c",
"FirstLine": 15,
"LineCount": 40
}Results: {
"Contents": " 15:\tstatic int subflow_get_info(struct sock *sk, struct sk_buff *skb, bool net_admin)\n 16:\t{\n 17:\t\tstruct mptcp_subflow_context *sf;\n 18:\t\tstruct nlattr *start;\n 19:\t\tu32 flags = 0;\n 20:\t\tbool slow;\n 21:\t\tint err;\n 22:\t\n 23:\t\tif (inet_sk_state_load(sk) == TCP_LISTEN)\n 24:\t\t\treturn 0;\n 25:\t\n 26:\t\tstart = nla_nest_start_noflag(skb, INET_ULP_INFO_MPTCP);\n 27:\t\tif (!start)\n 28:\t\t\treturn -EMSGSIZE;\n 29:\t\n 30:\t\tslow = lock_sock_fast(sk);\n 31:\t\trcu_read_lock();\n 32:\t\tsf = rcu_dereference(inet_csk(sk)-\u003eicsk_ulp_data);\n 33:\t\tif (!sf) {\n 34:\t\t\terr = 0;\n 35:\t\t\tgoto nla_failure;\n 36:\t\t}\n 37:\t\n 38:\t\tif (sf-\u003emp_capable)\n 39:\t\t\tflags |= MPTCP_SUBFLOW_FLAG_MCAP_REM;\n 40:\t\tif (sf-\u003erequest_mptcp)\n 41:\t\t\tflags |= MPTCP_SUBFLOW_FLAG_MCAP_LOC;\n 42:\t\tif (sf-\u003emp_join)\n 43:\t\t\tflags |= MPTCP_SUBFLOW_FLAG_JOIN_REM;\n 44:\t\tif (sf-\u003erequest_join)\n 45:\t\t\tflags |= MPTCP_SUBFLOW_FLAG_JOIN_LOC;\n 46:\t\tif (sf-\u003ebackup)\n 47:\t\t\tflags |= MPTCP_SUBFLOW_FLAG_BKUP_REM;\n 48:\t\tif (sf-\u003erequest_bkup)\n 49:\t\t\tflags |= MPTCP_SUBFLOW_FLAG_BKUP_LOC;\n 50:\t\tif (READ_ONCE(sf-\u003efully_established))\n 51:\t\t\tflags |= MPTCP_SUBFLOW_FLAG_FULLY_ESTABLISHED;\n 52:\t\tif (sf-\u003econn_finished)\n 53:\t\t\tflags |= MPTCP_SUBFLOW_FLAG_CONNECTED;\n 54:\t\tif (sf-\u003emap_valid)\n"
} |
| 51/3 | 2026/09/17 10:15 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 25970 output: 37 thoughts: 73 Thoughts: Here's my summary, as though I'm thinking through this process: **Diving into Subflow Information Handling** Okay, so `subflow_get_info`... right, it looks like it meticulously *inspects* specific fields to construct the `flags` value, instead of taking the easy route and just copying the entire `mptcp_subflow_context` structure or even the new `resetting` field directly to user space. That’s probably for good reason – likely to control what information is exposed, potentially sanitizing or restructuring data before transmission. A little more overhead, but probably more secure and maintainable long-term. Alright, let's refresh my memory on that `mptcp_subflow_context` struct. I'm going to have a look at `net/mptcp/protocol.h` to see exactly what's contained within that structure. I need to understand what's in that context to understand why they are choosing to do it this way. That file is the canonical source, so let's dig in. |
| 52/3 | 2026/09/17 10:16 | tool | read-file |
0mArgs:{
"File": "net/mptcp/protocol.h",
"FirstLine": 570,
"LineCount": 35
}Results: {
"Contents": " 570:\t\t\tpm_notified : 1, /* PM hook called for established status */\n 571:\t\t\tconn_finished : 1,\n 572:\t\t\tmap_valid : 1,\n 573:\t\t\tmap_csum_reqd : 1,\n 574:\t\t\tmap_data_fin : 1,\n 575:\t\t\tmpc_map : 1,\n 576:\t\t\tbackup : 1,\n 577:\t\t\tsend_mp_prio : 1,\n 578:\t\t\tsend_mp_fail : 1,\n 579:\t\t\tsend_fastclose : 1,\n 580:\t\t\tsend_infinite_map : 1,\n 581:\t\t\tremote_key_valid : 1, /* received the peer key from */\n 582:\t\t\tdisposable : 1,\t /* ctx can be free at ulp release time */\n 583:\t\t\tclosing : 1,\t /* must not pass rx data to msk anymore */\n 584:\t\t\tvalid_csum_seen : 1, /* at least one csum validated */\n 585:\t\t\tis_mptfo : 1,\t /* subflow is doing TFO */\n 586:\t\t\tclose_event_done : 1, /* has done the post-closed part */\n 587:\t\t\tmpc_drop : 1,\t /* the MPC option has been dropped in a rtx */\n 588:\t\t\tresetting : 1,\t /* subflow is resetting */\n 589:\t\t\t__unused : 8;\n 590:\t\tbool\tdata_avail;\n 591:\t\tbool\tscheduled;\n 592:\t\tbool\tpm_listener;\t /* a listener managed by the kernel PM? */\n 593:\t\tbool\tfully_established; /* path validated */\n 594:\t\tu32\tlent_mem_frag;\n 595:\t\tu32\tremote_nonce;\n 596:\t\tu64\tthmac;\n 597:\t\tu32\tlocal_nonce;\n 598:\t\tu32\tremote_token;\n 599:\t\tunion {\n 600:\t\t\tu8\thmac[MPTCPOPT_HMAC_LEN]; /* MPJ subflow only */\n 601:\t\t\tu64\tiasn;\t /* initial ack sequence number, MPC subflows only */\n 602:\t\t};\n 603:\t\ts16\tlocal_id;\t /* if negative not initialized yet */\n 604:\t\tu8\tremote_id;\n"
} |
| 53/3 | 2026/09/17 10:16 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 26969 output: 343 thoughts: 1092 Thoughts: **KMSAN Assessment: No Need Here** Okay, let's break this down from a memory safety perspective. Initially, I was looking at how `__unused` in the bitfield was changed, and then a new bit, `resetting`, was created within `struct mptcp_subflow_context`. My primary concern was about potential uninitialized values. However, this struct is allocated with `kzalloc_obj`, which *guarantees* zero-initialization. That means `resetting` *starts* as zero, and even if other parts of the bitfield are later modified, `resetting` retains its defined state, and `subflow->resetting` is always explicitly set to 1 in the function `mptcp_subflow_reset`. The condition `if (subflow->resetting) return;` uses a well-defined state that is initialized. Next, I looked at `mptcp_push_release` and the `info` struct. This is where I initially thought I might find a subtle issue. The `info` struct, allocated on the stack within `__mptcp_push_pending`, is initialized using a designated initializer: `.flags = flags`. My C experience immediately kicked in. I recalled C99/C11/C23 standard (6.7.8 / 6.7.9) specifying that uninitialized members within a brace-enclosed list are *implicitly zeroed* when using a designated initializer. This means `info.mss_now` and `info.size_goal` are guaranteed to be zero, not garbage, therefore `info->mss_now` is also 0. The guard `if (info->mss_now)` then prevents the execution of `tcp_push` when `mss_now` is zero, so this does not cause problems with TCP. Looking at the KMSAN rules, the patch doesn't introduce or modify data passed to userspace, doesn't rely on uninitialized variables for conditional logic, doesn't allocate complex data structures where uninitialized fields could be read later, and doesn't change bounds checks in a way that would allow uninitialized bytes to be accessed. The code clearly uses zero-initialization (explicitly and implicitly) for all relevant stack and heap structures. Thus, there is no risk of uninitialized memory usage or information leaks. Therefore, given the explicit zero-initialization using `kzalloc_obj` and the C standard behavior for designated initializers, I'm confident that `NeedsKMSAN` is `false`. KASAN and other standard bug detectors are more than adequate for this. The logic is sound, memory safety is ensured through initialization, and there is no risk of uninitialized memory. I'm satisfied. |
| 54/3 | 2026/09/17 10:16 | tool | set-results |
0mArgs:{
"KMSANReasoning": "The patch makes two targeted changes in MPTCP:\n1. In `mptcp_push_release()`, it checks `if (info-\u003emss_now)` before calling `tcp_push()`. The `info` struct is stack-allocated in `__mptcp_push_pending()` using a designated initializer (`struct mptcp_sendmsg_info info = { .flags = flags };`), which guarantees that all other fields including `mss_now` and `size_goal` are zero-initialized. Thus, `info-\u003emss_now` is well-defined and never uninitialized memory.\n2. A 1-bit field `resetting` is added to `struct mptcp_subflow_context`, carved out of the existing `__unused` bitfield. All instances of `struct mptcp_subflow_context` are allocated using `kzalloc_obj()`, ensuring that `resetting` is zero-initialized at allocation time. It is subsequently set to 1 in `mptcp_subflow_reset()` and checked in `subflow_state_change()`.\n\nNeither change introduces uninitialized data reads, copies uninitialized kernel memory to user space, nor alters buffer bounds/lengths in a manner that could expose uninitialized bytes. Any related bugs (such as state machine desynchronization, socket lifecycle issues, or null pointer dereferences) would be covered by standard kernel detectors and KASAN. Therefore, a dedicated KMSAN fuzzing session is not warranted.",
"NeedsKMSAN": false
}Results: {
"KMSANReasoning": "The patch makes two targeted changes in MPTCP:\n1. In `mptcp_push_release()`, it checks `if (info-\u003emss_now)` before calling `tcp_push()`. The `info` struct is stack-allocated in `__mptcp_push_pending()` using a designated initializer (`struct mptcp_sendmsg_info info = { .flags = flags };`), which guarantees that all other fields including `mss_now` and `size_goal` are zero-initialized. Thus, `info-\u003emss_now` is well-defined and never uninitialized memory.\n2. A 1-bit field `resetting` is added to `struct mptcp_subflow_context`, carved out of the existing `__unused` bitfield. All instances of `struct mptcp_subflow_context` are allocated using `kzalloc_obj()`, ensuring that `resetting` is zero-initialized at allocation time. It is subsequently set to 1 in `mptcp_subflow_reset()` and checked in `subflow_state_change()`.\n\nNeither change introduces uninitialized data reads, copies uninitialized kernel memory to user space, nor alters buffer bounds/lengths in a manner that could expose uninitialized bytes. Any related bugs (such as state machine desynchronization, socket lifecycle issues, or null pointer dereferences) would be covered by standard kernel detectors and KASAN. Therefore, a dedicated KMSAN fuzzing session is not warranted.",
"NeedsKMSAN": false
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|