AI Trajectory


Trajectory: (Expand/Collapse All)
Seq Timestamp Type Name Duration
0/0 2026/07/13 14:03 flow patch-triage
0m Args:
null

Results:
{
  "EnableConfigs": [
    "TCP_AO"
  ],
  "FocusSymbols": [
    "tcp_ao_hash_hdr",
    "tcp_ao_add_cmd"
  ],
  "Reasoning": "The patch fixes uninitialized memory in TCP AO options padding by adding a memset in tcp_v4_send_ack and tcp_v6_send_response. This is a functional change in reachable core network code.",
  "WorthFuzzing": true
}

1/1 2026/07/13 14:03 action read-patch-diff
0m Args:
null

Results:
{
  "PatchDiff": "commit a829dcc7078a89254648ded9404b04e2d4a43d00\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate:   Mon Jul 13 14:03:10 2026 +0000\n\n    syz-cluster: applied patch under review\n\ndiff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c\nindex 209ef7522508fc..2f6ff630a0e555 100644\n--- a/net/ipv4/tcp_ipv4.c\n+++ b/net/ipv4/tcp_ipv4.c\n@@ -971,6 +971,9 @@ static void tcp_v4_send_ack(const struct sock *sk,\n \t\t\t\t\t  key-\u003ercv_next);\n \t\targ.iov[0].iov_len += tcp_ao_len_aligned(key-\u003eao_key);\n \t\trep.th.doff = arg.iov[0].iov_len / 4;\n+\t\tmemset((u8 *)\u0026rep.opt[offset] + tcp_ao_maclen(key-\u003eao_key),\n+\t\t       TCPOPT_NOP, tcp_ao_len_aligned(key-\u003eao_key) -\n+\t\t\t\t    tcp_ao_len(key-\u003eao_key));\n \n \t\ttcp_ao_hash_hdr(AF_INET, (char *)\u0026rep.opt[offset],\n \t\t\t\tkey-\u003eao_key, key-\u003etraffic_key,\ndiff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c\nindex ebe161d72fbd07..0bc89014653da1 100644\n--- a/net/ipv6/tcp_ipv6.c\n+++ b/net/ipv6/tcp_ipv6.c\n@@ -923,6 +923,8 @@ static void tcp_v6_send_response(const struct sock *sk, struct sk_buff *skb, u32\n \t\t\t\t(tcp_ao_len(key-\u003eao_key) \u003c\u003c 16) |\n \t\t\t\t(key-\u003eao_key-\u003esndid \u003c\u003c 8) |\n \t\t\t\t(key-\u003ercv_next));\n+\t\tmemset((u8 *)topt + tcp_ao_maclen(key-\u003eao_key), TCPOPT_NOP,\n+\t\t       tcp_ao_len_aligned(key-\u003eao_key) - tcp_ao_len(key-\u003eao_key));\n \n \t\ttcp_ao_hash_hdr(AF_INET6, (char *)topt, key-\u003eao_key,\n \t\t\t\tkey-\u003etraffic_key,\n"
}

2/1 2026/07/13 14:03 agent patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
{
  "EnableConfigs": [
    "TCP_AO"
  ],
  "FocusSymbols": [
    "tcp_ao_hash_hdr",
    "tcp_ao_add_cmd"
  ],
  "Reasoning": "The patch fixes uninitialized memory in TCP AO options padding by adding a memset in tcp_v4_send_ack and tcp_v6_send_response. This is a functional change in reachable core network code.",
  "WorthFuzzing": true
}

Instruction:
You are an expert Linux kernel maintainer.
Your job is to review a provided patch series and determine
if it makes functional changes to the kernel that should be fuzzed.

IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in
your workspace. Do NOT rely on your internal knowledge of the kernel. You must actively
use your code access tools to examine the actual source code and confirm any assumptions.

Return WorthFuzzing=false if the patch only contains:
- Modifications to Documentation/, Kconfig files, or code comments.
- Purely decorative changes, such as logging (e.g., pr_err, printk) or tracepoints.
- Changes to numeric constants or macros that do not functionally alter execution flow.
- Code paths that are impossible to reach in virtualized environments like GCE or QEMU,
even when utilizing software-emulated hardware (e.g., usb gadget, mac80211_hwsim).

If it modifies reachable core kernel logic, drivers, or architectures, use your code search
tools to verify the code can be executed, then return WorthFuzzing=true.

When returning WorthFuzzing=true, you MUST ALSO:
1. Extract any specific kernel functions that should be heavily fuzzed into FocusSymbols.
   Avoid listing generic hot-path functions to prevent skewed test distributions.
2. Identify any specific CONFIG_ options required to properly test this new/modified feature.
   Go and look into the Kconfig files and check for ifdefs around the code, do not make assumptions.
   Do not list too generic configs (we already have them enabled). Only list those that
   specifically cover the modified code. List them in the EnableConfigs output array,
   and DO NOT add a 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4").
Prefer calling several tools at the same time to save round-trips.


Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.

Prompt:
For your convenience, here is the diff of the changes:
commit a829dcc7078a89254648ded9404b04e2d4a43d00
Author: syz-cluster <triage@syzkaller.com>
Date:   Mon Jul 13 14:03:10 2026 +0000

    syz-cluster: applied patch under review

diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 209ef7522508fc..2f6ff630a0e555 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -971,6 +971,9 @@ static void tcp_v4_send_ack(const struct sock *sk,
 					  key->rcv_next);
 		arg.iov[0].iov_len += tcp_ao_len_aligned(key->ao_key);
 		rep.th.doff = arg.iov[0].iov_len / 4;
+		memset((u8 *)&rep.opt[offset] + tcp_ao_maclen(key->ao_key),
+		       TCPOPT_NOP, tcp_ao_len_aligned(key->ao_key) -
+				    tcp_ao_len(key->ao_key));
 
 		tcp_ao_hash_hdr(AF_INET, (char *)&rep.opt[offset],
 				key->ao_key, key->traffic_key,
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index ebe161d72fbd07..0bc89014653da1 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -923,6 +923,8 @@ static void tcp_v6_send_response(const struct sock *sk, struct sk_buff *skb, u32
 				(tcp_ao_len(key->ao_key) << 16) |
 				(key->ao_key->sndid << 8) |
 				(key->rcv_next));
+		memset((u8 *)topt + tcp_ao_maclen(key->ao_key), TCPOPT_NOP,
+		       tcp_ao_len_aligned(key->ao_key) - tcp_ao_len(key->ao_key));
 
 		tcp_ao_hash_hdr(AF_INET6, (char *)topt, key->ao_key,
 				key->traffic_key,

3/2 2026/07/13 14:03 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 2210
							output: 42
							thoughts: 176
						

Thoughts:
**Analyzing a TCP AO Patch**

Okay, so I'm looking at a patch here that's touching `net/ipv4/tcp_ipv4.c` and `net/ipv6/tcp_ipv6.c`. It looks like the core of this change involves adding a `memset` function call, which makes me think it's dealing with padding for TCP AO options. Specifically, the patch is placing `TCPOPT_NOP` values in those padding bytes. This is probably to address a potential vulnerability or bug related to uninitialized memory being included in TCP AO packets; a common security concern.

To get a better grip on this, I need to focus on those two functions that were modified: `tcp_v4_send_ack` and `tcp_v6_send_response`. I need to figure out how TCP AO is used in these functions, and *where* specifically the padding is being added. Understanding the context will be key.

Next, I should look at the Kconfig options. I need to know if this TCP AO functionality, and therefore, the need for this padding, is enabled under a specific configuration or feature set. I'll quickly grep for the most relevant Kconfig options: something like `tcp_ao_len_aligned` or `tcp_ao_hash_hdr` should give me some clues about conditional compilation. This will help me understand the scope of this change and its impact on different kernel configurations.



4/2 2026/07/13 14:03 tool grepper
0m Args:
{
  "Expression": "tcp_ao_hash_hdr"
}

Results:
{
  "Output": "include/net/tcp_ao.h=222=struct tcp_ao_key *tcp_ao_do_lookup(const struct sock *sk, int l3index,\n--\ninclude/net/tcp_ao.h-224-\t\t\t\t    int family, int sndid, int rcvid);\ninclude/net/tcp_ao.h:225:int tcp_ao_hash_hdr(unsigned short family, char *ao_hash,\ninclude/net/tcp_ao.h-226-\t\t    struct tcp_ao_key *key, const u8 *tkey,\n--\nnet/ipv4/tcp_ao.c=616=static void tcp_ao_hash_header(struct tcp_ao_mac_ctx *mac_ctx,\n--\nnet/ipv4/tcp_ao.c-644-\nnet/ipv4/tcp_ao.c:645:int tcp_ao_hash_hdr(unsigned short int family, char *ao_hash,\nnet/ipv4/tcp_ao.c-646-\t\t    struct tcp_ao_key *key, const u8 *tkey,\n--\nnet/ipv4/tcp_ipv4.c=660=static bool tcp_v4_ao_sign_reset(const struct sock *sk, struct sk_buff *skb,\n--\nnet/ipv4/tcp_ipv4.c-686-\nnet/ipv4/tcp_ipv4.c:687:\tif (tcp_ao_hash_hdr(AF_INET, (char *)\u0026reply_options[1],\nnet/ipv4/tcp_ipv4.c-688-\t\t\t    key, traffic_key,\n--\nnet/ipv4/tcp_ipv4.c=909=static void tcp_v4_send_ack(const struct sock *sk,\n--\nnet/ipv4/tcp_ipv4.c-977-\nnet/ipv4/tcp_ipv4.c:978:\t\ttcp_ao_hash_hdr(AF_INET, (char *)\u0026rep.opt[offset],\nnet/ipv4/tcp_ipv4.c-979-\t\t\t\tkey-\u003eao_key, key-\u003etraffic_key,\n--\nnet/ipv6/tcp_ipv6.c=847=static void tcp_v6_send_response(const struct sock *sk, struct sk_buff *skb, u32 seq,\n--\nnet/ipv6/tcp_ipv6.c-928-\nnet/ipv6/tcp_ipv6.c:929:\t\ttcp_ao_hash_hdr(AF_INET6, (char *)topt, key-\u003eao_key,\nnet/ipv6/tcp_ipv6.c-930-\t\t\t\tkey-\u003etraffic_key,\n"
}

5/2 2026/07/13 14:03 tool grepper
0m Args:
{
  "Expression": "tcp_ao_len_aligned"
}

Results:
{
  "Output": "include/net/tcp_ao.h=80=static inline int tcp_ao_maclen(const struct tcp_ao_key *key)\n--\ninclude/net/tcp_ao.h-84-\ninclude/net/tcp_ao.h:85:/* Use tcp_ao_len_aligned() for TCP header calculations */\ninclude/net/tcp_ao.h-86-static inline int tcp_ao_len(const struct tcp_ao_key *key)\n--\ninclude/net/tcp_ao.h-90-\ninclude/net/tcp_ao.h:91:static inline int tcp_ao_len_aligned(const struct tcp_ao_key *key)\ninclude/net/tcp_ao.h-92-{\n--\nnet/ipv4/tcp_ao.c=1136=void tcp_ao_connect_init(struct sock *sk)\n--\nnet/ipv4/tcp_ao.c-1184-\t\t\tao_info-\u003ernext_key = key;\nnet/ipv4/tcp_ao.c:1185:\t\ttp-\u003etcp_header_len += tcp_ao_len_aligned(key);\nnet/ipv4/tcp_ao.c-1186-\n--\nnet/ipv4/tcp_ao.c=1380=static int tcp_ao_parse_crypto(const struct tcp_ao_add *cmd,\n--\nnet/ipv4/tcp_ao.c-1418-\tsyn_tcp_option_space -= TCPOLEN_WSCALE_ALIGNED;\nnet/ipv4/tcp_ao.c:1419:\tif (tcp_ao_len_aligned(key) \u003e syn_tcp_option_space)\nnet/ipv4/tcp_ao.c-1420-\t\treturn -EMSGSIZE;\n--\nnet/ipv4/tcp_ipv4.c=660=static bool tcp_v4_ao_sign_reset(const struct sock *sk, struct sk_buff *skb,\n--\nnet/ipv4/tcp_ipv4.c-683-\t\t\t\t (aoh-\u003ernext_keyid \u003c\u003c 8) | keyid);\nnet/ipv4/tcp_ipv4.c:684:\targ-\u003eiov[0].iov_len += tcp_ao_len_aligned(key);\nnet/ipv4/tcp_ipv4.c-685-\treply-\u003edoff = arg-\u003eiov[0].iov_len / 4;\n--\nnet/ipv4/tcp_ipv4.c=909=static void tcp_v4_send_ack(const struct sock *sk,\n--\nnet/ipv4/tcp_ipv4.c-971-\t\t\t\t\t  key-\u003ercv_next);\nnet/ipv4/tcp_ipv4.c:972:\t\targ.iov[0].iov_len += tcp_ao_len_aligned(key-\u003eao_key);\nnet/ipv4/tcp_ipv4.c-973-\t\trep.th.doff = arg.iov[0].iov_len / 4;\nnet/ipv4/tcp_ipv4.c-974-\t\tmemset((u8 *)\u0026rep.opt[offset] + tcp_ao_maclen(key-\u003eao_key),\nnet/ipv4/tcp_ipv4.c:975:\t\t       TCPOPT_NOP, tcp_ao_len_aligned(key-\u003eao_key) -\nnet/ipv4/tcp_ipv4.c-976-\t\t\t\t    tcp_ao_len(key-\u003eao_key));\n--\nnet/ipv4/tcp_minisocks.c=546=struct sock *tcp_create_openreq_child(const struct sock *sk,\n--\nnet/ipv4/tcp_minisocks.c-652-\t\tif (ao_key)\nnet/ipv4/tcp_minisocks.c:653:\t\t\tnewtp-\u003etcp_header_len += tcp_ao_len_aligned(ao_key);\nnet/ipv4/tcp_minisocks.c-654-\t}\n--\nnet/ipv4/tcp_output.c=959=static unsigned int tcp_syn_options(struct sock *sk, struct sk_buff *skb,\n--\nnet/ipv4/tcp_output.c-978-\t\t\topts-\u003eoptions |= OPTION_AO;\nnet/ipv4/tcp_output.c:979:\t\t\tremaining -= tcp_ao_len_aligned(key-\u003eao_key);\nnet/ipv4/tcp_output.c-980-\t\t}\n--\nnet/ipv4/tcp_output.c=1061=static unsigned int tcp_synack_options(const struct sock *sk,\n--\nnet/ipv4/tcp_output.c-1086-\t\topts-\u003eoptions |= OPTION_AO;\nnet/ipv4/tcp_output.c:1087:\t\tremaining -= tcp_ao_len_aligned(key-\u003eao_key);\nnet/ipv4/tcp_output.c-1088-\t\tireq-\u003etstamp_ok \u0026= !ireq-\u003esack_ok;\n--\nnet/ipv4/tcp_output.c=1151=static unsigned int tcp_established_options(struct sock *sk, struct sk_buff *skb,\n--\nnet/ipv4/tcp_output.c-1166-\t\topts-\u003eoptions |= OPTION_AO;\nnet/ipv4/tcp_output.c:1167:\t\tsize += tcp_ao_len_aligned(key-\u003eao_key);\nnet/ipv4/tcp_output.c-1168-\t}\n--\nnet/ipv6/tcp_ipv6.c=847=static void tcp_v6_send_response(const struct sock *sk, struct sk_buff *skb, u32 seq,\n--\nnet/ipv6/tcp_ipv6.c-867-\tif (tcp_key_is_ao(key))\nnet/ipv6/tcp_ipv6.c:868:\t\ttot_len += tcp_ao_len_aligned(key-\u003eao_key);\nnet/ipv6/tcp_ipv6.c-869-\n--\nnet/ipv6/tcp_ipv6.c-926-\t\tmemset((u8 *)topt + tcp_ao_maclen(key-\u003eao_key), TCPOPT_NOP,\nnet/ipv6/tcp_ipv6.c:927:\t\t       tcp_ao_len_aligned(key-\u003eao_key) - tcp_ao_len(key-\u003eao_key));\nnet/ipv6/tcp_ipv6.c-928-\n"
}

6/2 2026/07/13 14:03 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 5005
							output: 17
							thoughts: 41
						

Thoughts:
Okay, here's my take on those thoughts, framed as my own mental process:

**TCP Authentication Option (TCP AO) - Digging into the Configuration**

Alright, this code snippet has me thinking about TCP AO. My first instinct is to immediately check the kernel configuration files. Specifically, I'm going to look in `net/ipv4/Kconfig` or `net/ipv6/Kconfig`. That's where the TCP AO configuration options, most likely defined with a `config TCP_AO` or similar syntax, will reside. I need to understand how TCP AO is enabled, disabled, and what related features might be available. Understanding the configuration options is crucial for figuring out how this code fits into the bigger picture. This will give me a base to understand and review the code.



7/2 2026/07/13 14:03 tool grepper
0m Args:
{
  "Expression": "TCP_AO"
}

Results:
{
  "Output": "\nFull output is too long, showing 500 out of 1931 lines.\nUse more precise expression if possible.\n\nDocumentation/networking/tcp_ao.rst=296=userspace manage TCP-AO on a per-socket basis. In order to add/delete MKTs\nDocumentation/networking/tcp_ao.rst:297:``TCP_AO_ADD_KEY`` and ``TCP_AO_DEL_KEY`` TCP socket options must be used.\nDocumentation/networking/tcp_ao.rst-298-It is not allowed to add a key on an established non-TCP-AO connection\nDocumentation/networking/tcp_ao.rst=299=as well as to remove the last key from TCP-AO connection.\nDocumentation/networking/tcp_ao.rst-300-\nDocumentation/networking/tcp_ao.rst:301:``TCP_AO_ADD_KEY`` allows the MAC algorithm and MAC length to be selected.\nDocumentation/networking/tcp_ao.rst-302-Linux supports the mandatory-to-implement algorithms HMAC-SHA-1-96 and\nDocumentation/networking/tcp_ao.rst=303=AES-128-CMAC-96. In addition, as Linux extensions, it supports:\n--\nDocumentation/networking/tcp_ao.rst-314-\nDocumentation/networking/tcp_ao.rst:315:``setsockopt(TCP_AO_DEL_KEY)`` command may specify ``tcp_ao_del::current_key``\nDocumentation/networking/tcp_ao.rst-316-+ ``tcp_ao_del::set_current`` and/or ``tcp_ao_del::rnext``\n--\nDocumentation/networking/tcp_ao.rst=322=the TCP-AO connection.\nDocumentation/networking/tcp_ao.rst-323-\nDocumentation/networking/tcp_ao.rst:324:The usual/normal key-rotation can be performed with ``setsockopt(TCP_AO_INFO)``.\nDocumentation/networking/tcp_ao.rst-325-It also provides a uAPI to change per-socket TCP-AO settings, such as\nDocumentation/networking/tcp_ao.rst=326=ignoring ICMPs, as well as clear per-socket TCP-AO packet counters.\nDocumentation/networking/tcp_ao.rst:327:The corresponding ``getsockopt(TCP_AO_INFO)`` can be used to get those\nDocumentation/networking/tcp_ao.rst-328-per-socket TCP-AO settings.\nDocumentation/networking/tcp_ao.rst-329-\nDocumentation/networking/tcp_ao.rst:330:Another useful command is ``getsockopt(TCP_AO_GET_KEYS)``. One can use it\nDocumentation/networking/tcp_ao.rst-331-to list all MKTs on a TCP socket or use a filter to get keys for a specific\nDocumentation/networking/tcp_ao.rst=332=peer and/or sndid/rcvid, VRF L3 interface or get current_key/rnext_key.\nDocumentation/networking/tcp_ao.rst-333-\nDocumentation/networking/tcp_ao.rst:334:To repair TCP-AO connections ``setsockopt(TCP_AO_REPAIR)`` is available,\nDocumentation/networking/tcp_ao.rst-335-provided that the user previously has checkpointed/dumped the socket with\nDocumentation/networking/tcp_ao.rst:336:``getsockopt(TCP_AO_REPAIR)``.\nDocumentation/networking/tcp_ao.rst-337-\nDocumentation/networking/tcp_ao.rst=338=A tip here for scaled TCP_LISTEN sockets, that may have some thousands TCP-AO\nDocumentation/networking/tcp_ao.rst:339:keys, is: use filters in ``getsockopt(TCP_AO_GET_KEYS)`` and asynchronous\nDocumentation/networking/tcp_ao.rst:340:delete with ``setsockopt(TCP_AO_DEL_KEY)``.\nDocumentation/networking/tcp_ao.rst-341-\n--\nDocumentation/networking/tcp_ao.rst=396=At this moment, the resolution for the two races:\nDocumentation/networking/tcp_ao.rst:397:``setsockopt(TCP_AO_ADD_KEY)`` vs ``accept()``\nDocumentation/networking/tcp_ao.rst:398:and ``setsockopt(TCP_AO_DEL_KEY)`` vs ``accept()`` is delegated to userspace.\nDocumentation/networking/tcp_ao.rst-399-This means that it's expected that userspace would check the MKTs on the socket\n--\ninclude/linux/tcp.h=150=struct tcp_request_sock {\n--\ninclude/linux/tcp.h-176-\tu8\t\t\t\tsaw_accecn_opt  :2;\ninclude/linux/tcp.h:177:#ifdef CONFIG_TCP_AO\ninclude/linux/tcp.h-178-\tu8\t\t\t\tao_keyid;\n--\ninclude/linux/tcp.h=186=static inline bool tcp_rsk_used_ao(const struct request_sock *req)\ninclude/linux/tcp.h-187-{\ninclude/linux/tcp.h:188:#ifndef CONFIG_TCP_AO\ninclude/linux/tcp.h-189-\treturn false;\n--\ninclude/linux/tcp.h=197=struct tcp_sock {\n--\ninclude/linux/tcp.h-509-\ninclude/linux/tcp.h:510:#if defined(CONFIG_TCP_MD5SIG) || defined(CONFIG_TCP_AO)\ninclude/linux/tcp.h-511-/* TCP AF-Specific parts; only used by TCP-AO/MD5 Signature support so far */\n--\ninclude/linux/tcp.h-517-#endif\ninclude/linux/tcp.h:518:#ifdef CONFIG_TCP_AO\ninclude/linux/tcp.h-519-\tstruct tcp_ao_info\t__rcu *ao_info;\n--\ninclude/linux/tcp.h=568=struct tcp_timewait_sock {\n--\ninclude/linux/tcp.h-583-#endif\ninclude/linux/tcp.h:584:#ifdef CONFIG_TCP_AO\ninclude/linux/tcp.h-585-\tstruct tcp_ao_info\t__rcu *ao_info;\n--\ninclude/net/dropreason-core.h-29-\tFN(TCP_MD5FAILURE)\t\t\\\ninclude/net/dropreason-core.h:30:\tFN(TCP_AONOTFOUND)\t\t\\\ninclude/net/dropreason-core.h:31:\tFN(TCP_AOUNEXPECTED)\t\t\\\ninclude/net/dropreason-core.h:32:\tFN(TCP_AOKEYNOTFOUND)\t\t\\\ninclude/net/dropreason-core.h:33:\tFN(TCP_AOFAILURE)\t\t\\\ninclude/net/dropreason-core.h-34-\tFN(SOCKET_BACKLOG)\t\t\\\n--\ninclude/net/dropreason-core.h=138=enum skb_drop_reason {\n--\ninclude/net/dropreason-core.h-231-\t/**\ninclude/net/dropreason-core.h:232:\t * @SKB_DROP_REASON_TCP_AONOTFOUND: no TCP-AO hash and one was expected,\ninclude/net/dropreason-core.h-233-\t * corresponding to LINUX_MIB_TCPAOREQUIRED\ninclude/net/dropreason-core.h-234-\t */\ninclude/net/dropreason-core.h:235:\tSKB_DROP_REASON_TCP_AONOTFOUND,\ninclude/net/dropreason-core.h-236-\t/**\ninclude/net/dropreason-core.h:237:\t * @SKB_DROP_REASON_TCP_AOUNEXPECTED: TCP-AO hash is present and it\ninclude/net/dropreason-core.h-238-\t * was not expected, corresponding to LINUX_MIB_TCPAOKEYNOTFOUND\ninclude/net/dropreason-core.h-239-\t */\ninclude/net/dropreason-core.h:240:\tSKB_DROP_REASON_TCP_AOUNEXPECTED,\ninclude/net/dropreason-core.h-241-\t/**\ninclude/net/dropreason-core.h:242:\t * @SKB_DROP_REASON_TCP_AOKEYNOTFOUND: TCP-AO key is unknown,\ninclude/net/dropreason-core.h-243-\t * corresponding to LINUX_MIB_TCPAOKEYNOTFOUND\ninclude/net/dropreason-core.h-244-\t */\ninclude/net/dropreason-core.h:245:\tSKB_DROP_REASON_TCP_AOKEYNOTFOUND,\ninclude/net/dropreason-core.h-246-\t/**\ninclude/net/dropreason-core.h:247:\t * @SKB_DROP_REASON_TCP_AOFAILURE: TCP-AO hash is wrong,\ninclude/net/dropreason-core.h-248-\t * corresponding to LINUX_MIB_TCPAOBAD\ninclude/net/dropreason-core.h-249-\t */\ninclude/net/dropreason-core.h:250:\tSKB_DROP_REASON_TCP_AOFAILURE,\ninclude/net/dropreason-core.h-251-\t/**\n--\ninclude/net/tcp.h=2471=struct tcp_sock_af_ops {\n--\ninclude/net/tcp.h-2483-#endif\ninclude/net/tcp.h:2484:#ifdef CONFIG_TCP_AO\ninclude/net/tcp.h-2485-\tint (*ao_parse)(struct sock *sk, int optname, sockptr_t optval, int optlen);\n--\ninclude/net/tcp.h=2498=struct tcp_request_sock_ops {\n--\ninclude/net/tcp.h-2507-#endif\ninclude/net/tcp.h:2508:#ifdef CONFIG_TCP_AO\ninclude/net/tcp.h-2509-\tstruct tcp_ao_key *(*ao_lookup)(const struct sock *sk,\n--\ninclude/net/tcp.h=2584=static inline void tcp_get_current_key(const struct sock *sk,\n--\ninclude/net/tcp.h-2586-{\ninclude/net/tcp.h:2587:#if defined(CONFIG_TCP_AO) || defined(CONFIG_TCP_MD5SIG)\ninclude/net/tcp.h-2588-\tconst struct tcp_sock *tp = tcp_sk(sk);\n--\ninclude/net/tcp.h-2590-\ninclude/net/tcp.h:2591:#ifdef CONFIG_TCP_AO\ninclude/net/tcp.h-2592-\tif (static_branch_unlikely(\u0026tcp_ao_needed.key)) {\n--\ninclude/net/tcp.h=3045=static inline bool tcp_ao_required(struct sock *sk, const void *saddr,\n--\ninclude/net/tcp.h-3047-{\ninclude/net/tcp.h:3048:#ifdef CONFIG_TCP_AO\ninclude/net/tcp.h-3049-\tstruct tcp_ao_info *ao_info;\n--\ninclude/net/tcp_ao.h-1-/* SPDX-License-Identifier: GPL-2.0-or-later */\ninclude/net/tcp_ao.h:2:#ifndef _TCP_AO_H\ninclude/net/tcp_ao.h:3:#define _TCP_AO_H\ninclude/net/tcp_ao.h-4-\n--\ninclude/net/tcp_ao.h=34=enum tcp_ao_algo_id {\ninclude/net/tcp_ao.h:35:\tTCP_AO_ALGO_HMAC_SHA1 = 1, /* specified by RFC 5926 */\ninclude/net/tcp_ao.h:36:\tTCP_AO_ALGO_HMAC_SHA256, /* Linux extension */\ninclude/net/tcp_ao.h:37:\tTCP_AO_ALGO_AES_128_CMAC, /* specified by RFC 5926 */\ninclude/net/tcp_ao.h-38-};\n--\ninclude/net/tcp_ao.h-43- */\ninclude/net/tcp_ao.h:44:#define TCP_AO_MAX_MAC_LEN\t\tSHA256_DIGEST_SIZE\ninclude/net/tcp_ao.h-45-\ninclude/net/tcp_ao.h:46:#define TCP_AO_MAX_TRAFFIC_KEY_LEN\tSHA256_DIGEST_SIZE\ninclude/net/tcp_ao.h-47-\n--\ninclude/net/tcp_ao.h=50=struct tcp_ao_key {\n--\ninclude/net/tcp_ao.h-52-\tunion tcp_ao_addr\taddr;\ninclude/net/tcp_ao.h:53:\tu8\t\t\tkey[TCP_AO_MAXKEYLEN];\ninclude/net/tcp_ao.h-54-\tenum tcp_ao_algo_id\talgo;\n--\ninclude/net/tcp_ao.h=106=struct tcp_ao_info {\n--\ninclude/net/tcp_ao.h-109-\t/* current_key and rnext_key are maintained on sockets\ninclude/net/tcp_ao.h:110:\t * in TCP_AO_ESTABLISHED states.\ninclude/net/tcp_ao.h-111-\t * Their purpose is to cache keys on established connections,\n--\ninclude/net/tcp_ao.h=153=extern struct static_key_false_deferred tcp_md5_needed;\n--\ninclude/net/tcp_ao.h-157-#endif\ninclude/net/tcp_ao.h:158:#ifdef CONFIG_TCP_AO\ninclude/net/tcp_ao.h-159-/* TCP-AO structures and functions */\n--\ninclude/net/tcp_ao.h=161=extern struct static_key_false_deferred tcp_ao_needed;\n--\ninclude/net/tcp_ao.h-166-\ninclude/net/tcp_ao.h:167:#ifdef CONFIG_TCP_AO\ninclude/net/tcp_ao.h-168-/* TCP-AO structures and functions */\n--\ninclude/net/tcp_ao.h=178=struct tcp6_ao_context {\n--\ninclude/net/tcp_ao.h-187-/* Established states are fast-path and there always is current_key/rnext_key */\ninclude/net/tcp_ao.h:188:#define TCP_AO_ESTABLISHED (TCPF_ESTABLISHED | TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2 | \\\ninclude/net/tcp_ao.h-189-\t\t\t    TCPF_CLOSE_WAIT | TCPF_LAST_ACK | TCPF_CLOSING)\n--\ninclude/net/tcp_ao.h=280=void tcp_ao_syncookie(struct sock *sk, const struct sk_buff *skb,\ninclude/net/tcp_ao.h-281-\t\t      struct request_sock *req, unsigned short int family);\ninclude/net/tcp_ao.h:282:#else /* CONFIG_TCP_AO */\ninclude/net/tcp_ao.h-283-\n--\ninclude/net/tcp_ao.h=353=static inline int tcp_ao_set_repair(struct sock *sk,\n--\ninclude/net/tcp_ao.h-359-\ninclude/net/tcp_ao.h:360:#if defined(CONFIG_TCP_MD5SIG) || defined(CONFIG_TCP_AO)\ninclude/net/tcp_ao.h-361-int tcp_do_parse_auth_options(const struct tcphdr *th,\n--\ninclude/net/tcp_ao.h=364=static inline int tcp_do_parse_auth_options(const struct tcphdr *th,\n--\ninclude/net/tcp_ao.h-372-\ninclude/net/tcp_ao.h:373:#endif /* _TCP_AO_H */\n--\ninclude/trace/events/tcp.h=689=DEFINE_EVENT(tcp_ao_event, tcp_ao_handshake_failure,\n--\ninclude/trace/events/tcp.h-694-\ninclude/trace/events/tcp.h:695:#ifdef CONFIG_TCP_AO\ninclude/trace/events/tcp.h-696-DEFINE_EVENT(tcp_ao_event, tcp_ao_wrong_maclen,\n--\ninclude/trace/events/tcp.h=830=DEFINE_EVENT(tcp_ao_event_sne, tcp_ao_rcv_sne_update,\n--\ninclude/trace/events/tcp.h-833-);\ninclude/trace/events/tcp.h:834:#endif /* CONFIG_TCP_AO */\ninclude/trace/events/tcp.h-835-\n--\ninclude/uapi/linux/tcp.h=74=enum {\n--\ninclude/uapi/linux/tcp.h-134-\ninclude/uapi/linux/tcp.h:135:#define TCP_AO_ADD_KEY\t\t38\t/* Add/Set MKT */\ninclude/uapi/linux/tcp.h:136:#define TCP_AO_DEL_KEY\t\t39\t/* Delete MKT */\ninclude/uapi/linux/tcp.h:137:#define TCP_AO_INFO\t\t40\t/* Set/list TCP-AO per-socket options */\ninclude/uapi/linux/tcp.h:138:#define TCP_AO_GET_KEYS\t\t41\t/* List MKT(s) */\ninclude/uapi/linux/tcp.h:139:#define TCP_AO_REPAIR\t\t42\t/* Get/Set SNEs and ISNs */\ninclude/uapi/linux/tcp.h-140-\n--\ninclude/uapi/linux/tcp.h=399=struct tcp_diag_md5sig {\n--\ninclude/uapi/linux/tcp.h-406-\ninclude/uapi/linux/tcp.h:407:#define TCP_AO_MAXKEYLEN\t80\ninclude/uapi/linux/tcp.h-408-\ninclude/uapi/linux/tcp.h:409:#define TCP_AO_KEYF_IFINDEX\t(1 \u003c\u003c 0)\t/* L3 ifindex for VRF */\ninclude/uapi/linux/tcp.h:410:#define TCP_AO_KEYF_EXCLUDE_OPT\t(1 \u003c\u003c 1)\t/* \"Indicates whether TCP\ninclude/uapi/linux/tcp.h-411-\t\t\t\t\t\t *  options other than TCP-AO\n--\ninclude/uapi/linux/tcp.h-415-\ninclude/uapi/linux/tcp.h:416:struct tcp_ao_add { /* setsockopt(TCP_AO_ADD_KEY) */\ninclude/uapi/linux/tcp.h-417-\tstruct __kernel_sockaddr_storage addr;\t/* peer's address for the key */\n--\ninclude/uapi/linux/tcp.h-427-\t__u8\tmaclen;\t\t\t/* length of authentication code (hash) */\ninclude/uapi/linux/tcp.h:428:\t__u8\tkeyflags;\t\t/* see TCP_AO_KEYF_ */\ninclude/uapi/linux/tcp.h-429-\t__u8\tkeylen;\t\t\t/* length of ::key */\ninclude/uapi/linux/tcp.h:430:\t__u8\tkey[TCP_AO_MAXKEYLEN];\ninclude/uapi/linux/tcp.h-431-} __attribute__((aligned(8)));\ninclude/uapi/linux/tcp.h-432-\ninclude/uapi/linux/tcp.h:433:struct tcp_ao_del { /* setsockopt(TCP_AO_DEL_KEY) */\ninclude/uapi/linux/tcp.h-434-\tstruct __kernel_sockaddr_storage addr;\t/* peer's address for the key */\n--\ninclude/uapi/linux/tcp.h-445-\t__u8\trnext;\t\t\t/* KeyID to set as Rnext_key */\ninclude/uapi/linux/tcp.h:446:\t__u8\tkeyflags;\t\t/* see TCP_AO_KEYF_ */\ninclude/uapi/linux/tcp.h-447-} __attribute__((aligned(8)));\ninclude/uapi/linux/tcp.h-448-\ninclude/uapi/linux/tcp.h:449:struct tcp_ao_info_opt { /* setsockopt(TCP_AO_INFO), getsockopt(TCP_AO_INFO) */\ninclude/uapi/linux/tcp.h-450-\t/* Here 'in' is for setsockopt(), 'out' is for getsockopt() */\n--\ninclude/uapi/linux/tcp.h-466-\ninclude/uapi/linux/tcp.h:467:struct tcp_ao_getsockopt { /* getsockopt(TCP_AO_GET_KEYS) */\ninclude/uapi/linux/tcp.h-468-\tstruct __kernel_sockaddr_storage addr;\t/* in/out: dump keys for peer\n--\ninclude/uapi/linux/tcp.h-471-\tchar\talg_name[64];\t\t/* out: crypto hash algorithm */\ninclude/uapi/linux/tcp.h:472:\t__u8\tkey[TCP_AO_MAXKEYLEN];\ninclude/uapi/linux/tcp.h-473-\t__u32\tnkeys;\t\t\t/* in: size of the userspace buffer\n--\ninclude/uapi/linux/tcp.h-492-\t\t\t\t\t */\ninclude/uapi/linux/tcp.h:493:\t__u8\tkeyflags;\t\t/* in/out: see TCP_AO_KEYF_ */\ninclude/uapi/linux/tcp.h-494-\t__u8\tkeylen;\t\t\t/* out: length of ::key */\n--\ninclude/uapi/linux/tcp.h-499-\ninclude/uapi/linux/tcp.h:500:struct tcp_ao_repair { /* {s,g}etsockopt(TCP_AO_REPAIR) */\ninclude/uapi/linux/tcp.h-501-\t__be32\t\t\tsnt_isn;\n--\nnet/ipv4/Kconfig=729=config DEFAULT_TCP_CONG\n--\nnet/ipv4/Kconfig-743-\nnet/ipv4/Kconfig:744:config TCP_AO\nnet/ipv4/Kconfig-745-\tbool \"TCP: Authentication Option (RFC5925)\"\n--\nnet/ipv4/Makefile=67=obj-$(CONFIG_XFRM) += xfrm4_policy.o xfrm4_state.o xfrm4_input.o \\\nnet/ipv4/Makefile-68-\t\t      xfrm4_output.o xfrm4_protocol.o\nnet/ipv4/Makefile:69:obj-$(CONFIG_TCP_AO) += tcp_ao.o\nnet/ipv4/Makefile-70-\n--\nnet/ipv4/tcp.c=3837=int do_tcp_setsockopt(struct sock *sk, int level, int optname,\n--\nnet/ipv4/tcp.c-4062-\nnet/ipv4/tcp.c:4063:\tcase TCP_AO_REPAIR:\nnet/ipv4/tcp.c-4064-\t\tif (!tcp_can_repair_sock(sk)) {\n--\nnet/ipv4/tcp.c-4069-\t\tbreak;\nnet/ipv4/tcp.c:4070:#ifdef CONFIG_TCP_AO\nnet/ipv4/tcp.c:4071:\tcase TCP_AO_ADD_KEY:\nnet/ipv4/tcp.c:4072:\tcase TCP_AO_DEL_KEY:\nnet/ipv4/tcp.c:4073:\tcase TCP_AO_INFO: {\nnet/ipv4/tcp.c-4074-\t\t/* If this is the first TCP-AO setsockopt() on the socket,\n--\nnet/ipv4/tcp.c=4481=int do_tcp_getsockopt(struct sock *sk, int level,\n--\nnet/ipv4/tcp.c-4805-#endif\nnet/ipv4/tcp.c:4806:\tcase TCP_AO_REPAIR:\nnet/ipv4/tcp.c-4807-\t\tif (!tcp_can_repair_sock(sk))\n--\nnet/ipv4/tcp.c-4809-\t\treturn tcp_ao_get_repair(sk, optval, optlen);\nnet/ipv4/tcp.c:4810:\tcase TCP_AO_GET_KEYS:\nnet/ipv4/tcp.c:4811:\tcase TCP_AO_INFO: {\nnet/ipv4/tcp.c-4812-\t\tint err;\n--\nnet/ipv4/tcp.c-4814-\t\tsockopt_lock_sock(sk);\nnet/ipv4/tcp.c:4815:\t\tif (optname == TCP_AO_GET_KEYS)\nnet/ipv4/tcp.c-4816-\t\t\terr = tcp_ao_get_mkts(sk, optval, optlen);\n--\nnet/ipv4/tcp.c=4950=tcp_inbound_md5_hash(const struct sock *sk, const struct sk_buff *skb,\n--\nnet/ipv4/tcp.c-4958-\nnet/ipv4/tcp.c:4959:#if defined(CONFIG_TCP_MD5SIG) || defined(CONFIG_TCP_AO)\nnet/ipv4/tcp.c-4960-/*\n--\nnet/ipv4/tcp.c=4963=int tcp_do_parse_auth_options(const struct tcphdr *th,\n--\nnet/ipv4/tcp.c-4969-\nnet/ipv4/tcp.c:4970:\tif (IS_ENABLED(CONFIG_TCP_AO))\nnet/ipv4/tcp.c-4971-\t\tminlen = sizeof(struct tcp_ao_hdr) + 1;\n--\nnet/ipv4/tcp.c=5014=tcp_inbound_hash(struct sock *sk, const struct request_sock *req,\n--\nnet/ipv4/tcp.c-5043-\t\t\ttrace_tcp_ao_handshake_failure(sk, skb, keyid, rnext, maclen);\nnet/ipv4/tcp.c:5044:\t\t\treturn SKB_DROP_REASON_TCP_AOFAILURE;\nnet/ipv4/tcp.c-5045-\t\t}\n--\nnet/ipv4/tcp.c-5061-\t\t\ttrace_tcp_hash_ao_required(sk, skb);\nnet/ipv4/tcp.c:5062:\t\t\treturn SKB_DROP_REASON_TCP_AONOTFOUND;\nnet/ipv4/tcp.c-5063-\t\t}\n--\nnet/ipv4/tcp_ao.c=26=static const struct tcp_ao_algo {\n--\nnet/ipv4/tcp_ao.c-29-} tcp_ao_algos[] = {\nnet/ipv4/tcp_ao.c:30:\t[TCP_AO_ALGO_HMAC_SHA1] = {\nnet/ipv4/tcp_ao.c-31-\t\t.name = \"hmac(sha1)\",\n--\nnet/ipv4/tcp_ao.c-33-\t},\nnet/ipv4/tcp_ao.c:34:\t[TCP_AO_ALGO_HMAC_SHA256] = {\nnet/ipv4/tcp_ao.c-35-\t\t.name = \"hmac(sha256)\",\n--\nnet/ipv4/tcp_ao.c-37-\t},\nnet/ipv4/tcp_ao.c:38:\t[TCP_AO_ALGO_AES_128_CMAC] = {\nnet/ipv4/tcp_ao.c-39-\t\t.name = \"cmac(aes128)\",\n--\nnet/ipv4/tcp_ao.c=56=static const struct tcp_ao_algo *tcp_ao_find_algo(const char *name)\n--\nnet/ipv4/tcp_ao.c-62-\t\t\tcontinue;\nnet/ipv4/tcp_ao.c:63:\t\tif (WARN_ON_ONCE(algo-\u003edigest_size \u003e TCP_AO_MAX_MAC_LEN ||\nnet/ipv4/tcp_ao.c-64-\t\t\t\t algo-\u003edigest_size \u003e\nnet/ipv4/tcp_ao.c:65:\t\t\t\t\t TCP_AO_MAX_TRAFFIC_KEY_LEN))\nnet/ipv4/tcp_ao.c-66-\t\t\tcontinue;\n--\nnet/ipv4/tcp_ao.c=73=static void tcp_ao_mac_init(struct tcp_ao_mac_ctx *mac_ctx,\n--\nnet/ipv4/tcp_ao.c-77-\tswitch (mac_ctx-\u003ealgo) {\nnet/ipv4/tcp_ao.c:78:\tcase TCP_AO_ALGO_HMAC_SHA1:\nnet/ipv4/tcp_ao.c-79-\t\thmac_sha1_init_usingrawkey(\u0026mac_ctx-\u003ehmac_sha1, traffic_key,\n--\nnet/ipv4/tcp_ao.c-81-\t\treturn;\nnet/ipv4/tcp_ao.c:82:\tcase TCP_AO_ALGO_HMAC_SHA256:\nnet/ipv4/tcp_ao.c-83-\t\thmac_sha256_init_usingrawkey(\u0026mac_ctx-\u003ehmac_sha256, traffic_key,\n--\nnet/ipv4/tcp_ao.c-85-\t\treturn;\nnet/ipv4/tcp_ao.c:86:\tcase TCP_AO_ALGO_AES_128_CMAC:\nnet/ipv4/tcp_ao.c-87-\t\taes_cmac_preparekey(\u0026mac_ctx-\u003eaes_cmac.key, traffic_key,\n--\nnet/ipv4/tcp_ao.c=96=void tcp_ao_mac_update(struct tcp_ao_mac_ctx *mac_ctx, const void *data,\n--\nnet/ipv4/tcp_ao.c-99-\tswitch (mac_ctx-\u003ealgo) {\nnet/ipv4/tcp_ao.c:100:\tcase TCP_AO_ALGO_HMAC_SHA1:\nnet/ipv4/tcp_ao.c-101-\t\thmac_sha1_update(\u0026mac_ctx-\u003ehmac_sha1, data, data_len);\nnet/ipv4/tcp_ao.c-102-\t\treturn;\nnet/ipv4/tcp_ao.c:103:\tcase TCP_AO_ALGO_HMAC_SHA256:\nnet/ipv4/tcp_ao.c-104-\t\thmac_sha256_update(\u0026mac_ctx-\u003ehmac_sha256, data, data_len);\nnet/ipv4/tcp_ao.c-105-\t\treturn;\nnet/ipv4/tcp_ao.c:106:\tcase TCP_AO_ALGO_AES_128_CMAC:\nnet/ipv4/tcp_ao.c-107-\t\taes_cmac_update(\u0026mac_ctx-\u003eaes_cmac.ctx, data, data_len);\n--\nnet/ipv4/tcp_ao.c=114=static void tcp_ao_mac_final(struct tcp_ao_mac_ctx *mac_ctx, u8 *out)\n--\nnet/ipv4/tcp_ao.c-116-\tswitch (mac_ctx-\u003ealgo) {\nnet/ipv4/tcp_ao.c:117:\tcase TCP_AO_ALGO_HMAC_SHA1:\nnet/ipv4/tcp_ao.c-118-\t\thmac_sha1_final(\u0026mac_ctx-\u003ehmac_sha1, out);\nnet/ipv4/tcp_ao.c-119-\t\treturn;\nnet/ipv4/tcp_ao.c:120:\tcase TCP_AO_ALGO_HMAC_SHA256:\nnet/ipv4/tcp_ao.c-121-\t\thmac_sha256_final(\u0026mac_ctx-\u003ehmac_sha256, out);\nnet/ipv4/tcp_ao.c-122-\t\treturn;\nnet/ipv4/tcp_ao.c:123:\tcase TCP_AO_ALGO_AES_128_CMAC:\nnet/ipv4/tcp_ao.c-124-\t\taes_cmac_final(\u0026mac_ctx-\u003eaes_cmac.ctx, out);\n--\nnet/ipv4/tcp_ao.c=131=void tcp_ao_calc_traffic_key(const struct tcp_ao_key *mkt, u8 *traffic_key,\n--\nnet/ipv4/tcp_ao.c-134-\tswitch (mkt-\u003ealgo) {\nnet/ipv4/tcp_ao.c:135:\tcase TCP_AO_ALGO_HMAC_SHA1:\nnet/ipv4/tcp_ao.c-136-\t\thmac_sha1_usingrawkey(mkt-\u003ekey, mkt-\u003ekeylen, input, input_len,\n--\nnet/ipv4/tcp_ao.c-138-\t\treturn;\nnet/ipv4/tcp_ao.c:139:\tcase TCP_AO_ALGO_HMAC_SHA256:\nnet/ipv4/tcp_ao.c-140-\t\thmac_sha256_usingrawkey(mkt-\u003ekey, mkt-\u003ekeylen, input, input_len,\n--\nnet/ipv4/tcp_ao.c-142-\t\treturn;\nnet/ipv4/tcp_ao.c:143:\tcase TCP_AO_ALGO_AES_128_CMAC: {\nnet/ipv4/tcp_ao.c-144-\t\tstruct aes_cmac_key k;\n--\nnet/ipv4/tcp_ao.c=246=static int __tcp_ao_key_cmp(const struct tcp_ao_key *key, int l3index,\n--\nnet/ipv4/tcp_ao.c-253-\t\treturn (key-\u003ercvid \u003e rcvid) ? 1 : -1;\nnet/ipv4/tcp_ao.c:254:\tif (l3index \u003e= 0 \u0026\u0026 (key-\u003ekeyflags \u0026 TCP_AO_KEYF_IFINDEX)) {\nnet/ipv4/tcp_ao.c-255-\t\tif (key-\u003el3index != l3index)\n--\nnet/ipv4/tcp_ao.c=645=int tcp_ao_hash_hdr(unsigned short int family, char *ao_hash,\n--\nnet/ipv4/tcp_ao.c-652-\tstruct tcp_ao_mac_ctx mac_ctx;\nnet/ipv4/tcp_ao.c:653:\tu8 hash_buf[TCP_AO_MAX_MAC_LEN];\nnet/ipv4/tcp_ao.c-654-\n--\nnet/ipv4/tcp_ao.c-669-\ttcp_ao_hash_header(\u0026mac_ctx, th,\nnet/ipv4/tcp_ao.c:670:\t\t\t   !!(key-\u003ekeyflags \u0026 TCP_AO_KEYF_EXCLUDE_OPT),\nnet/ipv4/tcp_ao.c-671-\t\t\t   ao_hash, hash_offset, tcp_ao_maclen(key));\n--\nnet/ipv4/tcp_ao.c=713=int tcp_ao_hash_skb(unsigned short int family,\n--\nnet/ipv4/tcp_ao.c-719-\tstruct tcp_ao_mac_ctx mac_ctx;\nnet/ipv4/tcp_ao.c:720:\tu8 hash_buf[TCP_AO_MAX_MAC_LEN];\nnet/ipv4/tcp_ao.c-721-\n--\nnet/ipv4/tcp_ao.c-726-\ttcp_ao_hash_header(\u0026mac_ctx, th,\nnet/ipv4/tcp_ao.c:727:\t\t\t   !!(key-\u003ekeyflags \u0026 TCP_AO_KEYF_EXCLUDE_OPT),\nnet/ipv4/tcp_ao.c-728-\t\t\t   ao_hash, hash_offset, tcp_ao_maclen(key));\n--\nnet/ipv4/tcp_ao.c=748=int tcp_v4_ao_synack_hash(char *ao_hash, struct tcp_ao_key *ao_key,\n--\nnet/ipv4/tcp_ao.c-751-{\nnet/ipv4/tcp_ao.c:752:\tu8 tkey_buf[TCP_AO_MAX_TRAFFIC_KEY_LEN];\nnet/ipv4/tcp_ao.c-753-\n--\nnet/ipv4/tcp_ao.c=782=int tcp_ao_prepare_reset(const struct sock *sk, struct sk_buff *skb,\n--\nnet/ipv4/tcp_ao.c-794-\t * save/restore traffic keys before/after reboot.\nnet/ipv4/tcp_ao.c:795:\t * Linux TCP-AO support provides TCP_AO_ADD_KEY and TCP_AO_REPAIR\nnet/ipv4/tcp_ao.c-796-\t * options to restore a socket post-reboot.\n--\nnet/ipv4/tcp_ao.c=867=void tcp_ao_transmit_skb(struct sock *sk, struct sk_buff *skb,\n--\nnet/ipv4/tcp_ao.c-871-\tstruct tcp_skb_cb *tcb = TCP_SKB_CB(skb);\nnet/ipv4/tcp_ao.c:872:\tu8 tkey_buf[TCP_AO_MAX_TRAFFIC_KEY_LEN];\nnet/ipv4/tcp_ao.c-873-\tstruct tcp_sock *tp = tcp_sk(sk);\n--\nnet/ipv4/tcp_ao.c=918=void tcp_ao_syncookie(struct sock *sk, const struct sk_buff *skb,\n--\nnet/ipv4/tcp_ao.c-926-\nnet/ipv4/tcp_ao.c:927:\t/* treq-\u003eaf_specific is used to perform TCP_AO lookup\nnet/ipv4/tcp_ao.c-928-\t * in tcp_create_openreq_child().\n--\nnet/ipv4/tcp_ao.c=954=tcp_ao_verify_hash(const struct sock *sk, const struct sk_buff *skb,\n--\nnet/ipv4/tcp_ao.c-960-\tu8 maclen = tcp_ao_hdr_maclen(aoh);\nnet/ipv4/tcp_ao.c:961:\tu8 hash_buf[TCP_AO_MAX_MAC_LEN];\nnet/ipv4/tcp_ao.c-962-\n--\nnet/ipv4/tcp_ao.c-968-\t\t\t\t\t  aoh-\u003ernext_keyid, maclen);\nnet/ipv4/tcp_ao.c:969:\t\treturn SKB_DROP_REASON_TCP_AOFAILURE;\nnet/ipv4/tcp_ao.c-970-\t}\n--\nnet/ipv4/tcp_ao.c-980-\t\t\t\t      aoh-\u003ernext_keyid, maclen);\nnet/ipv4/tcp_ao.c:981:\t\treturn SKB_DROP_REASON_TCP_AOFAILURE;\nnet/ipv4/tcp_ao.c-982-\t}\n--\nnet/ipv4/tcp_ao.c=990=tcp_inbound_ao_hash(struct sock *sk, const struct sk_buff *skb,\n--\nnet/ipv4/tcp_ao.c-993-{\nnet/ipv4/tcp_ao.c:994:\tu8 tkey_buf[TCP_AO_MAX_TRAFFIC_KEY_LEN];\nnet/ipv4/tcp_ao.c-995-\tconst struct tcphdr *th = tcp_hdr(skb);\n--\nnet/ipv4/tcp_ao.c-1009-\t\t\t\t\t   aoh-\u003ernext_keyid, maclen);\nnet/ipv4/tcp_ao.c:1010:\t\treturn SKB_DROP_REASON_TCP_AOUNEXPECTED;\nnet/ipv4/tcp_ao.c-1011-\t}\n--\nnet/ipv4/tcp_ao.c-1019-\t/* Fast-path */\nnet/ipv4/tcp_ao.c:1020:\tif (likely((1 \u003c\u003c state) \u0026 TCP_AO_ESTABLISHED)) {\nnet/ipv4/tcp_ao.c-1021-\t\tenum skb_drop_reason err;\n--\nnet/ipv4/tcp_ao.c-1102-\t\tWARN_ONCE(1, \"TCP-AO: Unexpected sk_state %d\", state);\nnet/ipv4/tcp_ao.c:1103:\t\treturn SKB_DROP_REASON_TCP_AOFAILURE;\nnet/ipv4/tcp_ao.c-1104-\t}\n--\nnet/ipv4/tcp_ao.c-1114-\t\t\t\t   aoh-\u003ernext_keyid, maclen);\nnet/ipv4/tcp_ao.c:1115:\treturn SKB_DROP_REASON_TCP_AOKEYNOTFOUND;\nnet/ipv4/tcp_ao.c-1116-}\n--\nnet/ipv4/tcp_ao.c=1380=static int tcp_ao_parse_crypto(const struct tcp_ao_add *cmd,\n--\nnet/ipv4/tcp_ao.c-1421-\nnet/ipv4/tcp_ao.c:1422:\tif (key-\u003ealgo == TCP_AO_ALGO_AES_128_CMAC \u0026\u0026\nnet/ipv4/tcp_ao.c-1423-\t    cmd-\u003ekeylen != AES_KEYSIZE_128) {\n--\nnet/ipv4/tcp_ao.c=1527=static struct tcp_ao_info *getsockopt_ao_info(struct sock *sk)\n--\nnet/ipv4/tcp_ao.c-1536-\nnet/ipv4/tcp_ao.c:1537:#define TCP_AO_KEYF_ALL (TCP_AO_KEYF_IFINDEX | TCP_AO_KEYF_EXCLUDE_OPT)\nnet/ipv4/tcp_ao.c:1538:#define TCP_AO_GET_KEYF_VALID\t(TCP_AO_KEYF_IFINDEX)\nnet/ipv4/tcp_ao.c-1539-\n--\nnet/ipv4/tcp_ao.c=1572=static int tcp_ao_add_cmd(struct sock *sk, unsigned short int family,\n--\nnet/ipv4/tcp_ao.c-1588-\nnet/ipv4/tcp_ao.c:1589:\tif (cmd.keylen \u003e TCP_AO_MAXKEYLEN)\nnet/ipv4/tcp_ao.c-1590-\t\treturn -EINVAL;\n--\nnet/ipv4/tcp_ao.c-1601-\nnet/ipv4/tcp_ao.c:1602:\tif (cmd.keyflags \u0026 ~TCP_AO_KEYF_ALL)\nnet/ipv4/tcp_ao.c-1603-\t\treturn -EINVAL;\n--\nnet/ipv4/tcp_ao.c-1609-\n\n"
}

8/2 2026/07/13 14:03 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 16085
							output: 21
							thoughts: 598
						

Thoughts:
**Analyzing the TCP AO Patch**

Okay, so this patch is adding a `memset` to pad the TCP AO option within the `tcp_v4_send_ack` and `tcp_v6_send_response` functions. This is a functional change, aimed at preventing uninitialized memory from leaking in the TCP AO option.  These functions are critical, used for sending ACKs and responses like RSTs, and potentially reachable in virtualized environments.  The `TCP_AO` config option has to be enabled for this patch to even take effect.

My initial thought is to evaluate the implications of modifying these hot-path functions. Since both `tcp_v4_send_ack` and `tcp_v6_send_response` are core to TCP operations, ACKs specifically, I'm concerned about performance.  But, after re-reviewing the diff, I see the modification is conditional, happening only within an `if (tcp_key_is_ao(key))` block or similar.  It's focused on the TCP AO code path specifically.

Now, my focus shifts to fuzzing. While `tcp_v4_send_ack` and `tcp_v6_send_response` are hot-path, they are fairly generic.  This patch modifies a very small part of the function.  I'm wondering if there's a better target for fuzzing within the TCP AO code itself.  I need to identify a function that is more specific to the TCP AO logic. Perhaps the `tcp_ao_hash_hdr` function, or even `tcp_ao_add_cmd` or `tcp_ao_maclen`. `tcp_ao_hash_hdr` seems particularly promising, as it's directly related to the hashing aspect of TCP AO. I need to investigate that one further.



9/2 2026/07/13 14:03 tool grepper
0m Args:
{
  "Expression": "tcp_ao_hash_hdr"
}

Results:
{
  "Output": "include/net/tcp_ao.h=222=struct tcp_ao_key *tcp_ao_do_lookup(const struct sock *sk, int l3index,\n--\ninclude/net/tcp_ao.h-224-\t\t\t\t    int family, int sndid, int rcvid);\ninclude/net/tcp_ao.h:225:int tcp_ao_hash_hdr(unsigned short family, char *ao_hash,\ninclude/net/tcp_ao.h-226-\t\t    struct tcp_ao_key *key, const u8 *tkey,\n--\nnet/ipv4/tcp_ao.c=616=static void tcp_ao_hash_header(struct tcp_ao_mac_ctx *mac_ctx,\n--\nnet/ipv4/tcp_ao.c-644-\nnet/ipv4/tcp_ao.c:645:int tcp_ao_hash_hdr(unsigned short int family, char *ao_hash,\nnet/ipv4/tcp_ao.c-646-\t\t    struct tcp_ao_key *key, const u8 *tkey,\n--\nnet/ipv4/tcp_ipv4.c=660=static bool tcp_v4_ao_sign_reset(const struct sock *sk, struct sk_buff *skb,\n--\nnet/ipv4/tcp_ipv4.c-686-\nnet/ipv4/tcp_ipv4.c:687:\tif (tcp_ao_hash_hdr(AF_INET, (char *)\u0026reply_options[1],\nnet/ipv4/tcp_ipv4.c-688-\t\t\t    key, traffic_key,\n--\nnet/ipv4/tcp_ipv4.c=909=static void tcp_v4_send_ack(const struct sock *sk,\n--\nnet/ipv4/tcp_ipv4.c-977-\nnet/ipv4/tcp_ipv4.c:978:\t\ttcp_ao_hash_hdr(AF_INET, (char *)\u0026rep.opt[offset],\nnet/ipv4/tcp_ipv4.c-979-\t\t\t\tkey-\u003eao_key, key-\u003etraffic_key,\n--\nnet/ipv6/tcp_ipv6.c=847=static void tcp_v6_send_response(const struct sock *sk, struct sk_buff *skb, u32 seq,\n--\nnet/ipv6/tcp_ipv6.c-928-\nnet/ipv6/tcp_ipv6.c:929:\t\ttcp_ao_hash_hdr(AF_INET6, (char *)topt, key-\u003eao_key,\nnet/ipv6/tcp_ipv6.c-930-\t\t\t\tkey-\u003etraffic_key,\n"
}

10/2 2026/07/13 14:03 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 17761
							output: 100
							thoughts: 413
						

Thoughts:
**My Analysis of Target Functions for Fuzzing TCP AO Padding**

Okay, let's zero in on the best focus symbols for fuzzing this TCP AO padding vulnerability. My initial thought was `tcp_ao_hash_hdr`, and I still think it's a strong candidate. It's directly tied to the modified code and, importantly, specific to TCP AO, which makes it more targeted than something generic like `tcp_v4_send_ack`. Actually, I see that the changes are in both `tcp_v4_send_ack` and `tcp_v6_send_response`, but focusing on the TCP AO specific element of `tcp_ao_hash_hdr` should still be good. The fuzzer will be incentivized to hit that code path after the `memset` call.

Then I realized `tcp_ao_add_cmd` is very relevant, as this function prepares the key and sets up the state needed to reach `tcp_ao_hash_hdr`. This is another excellent focus symbol to add. It will force the fuzzer to explore the initialization of the AO key itself.

Let me just quickly scan the landscape for any other compelling options. I'm thinking of functions like `tcp_ao_hash_skb`, `tcp_v4_ao_synack_hash`, `tcp_ao_prepare_reset`, `tcp_ao_transmit_skb`, `tcp_ao_syncookie`, and `tcp_ao_verify_hash`, but nothing seems quite as directly relevant. For maximum efficiency and focus, I'll stick with `tcp_ao_hash_hdr` and `tcp_ao_add_cmd`.

For configuration, I'll need to enable `TCP_AO`.

The reasoning is pretty straightforward: this patch addresses uninitialized memory in TCP AO options padding. Specifically, it introduces a `memset` call in `tcp_v4_send_ack` and `tcp_v6_send_response` to fix the issue. This makes it a functional change in reachable core network code. The choice of `tcp_ao_hash_hdr` and `tcp_ao_add_cmd` will help maximize the chance of the fuzzer exercising the new code.



11/2 2026/07/13 14:03 tool set-results
0m Args:
{
  "EnableConfigs": [
    "TCP_AO"
  ],
  "FocusSymbols": [
    "tcp_ao_hash_hdr",
    "tcp_ao_add_cmd"
  ],
  "Reasoning": "The patch fixes uninitialized memory in TCP AO options padding by adding a memset in tcp_v4_send_ack and tcp_v6_send_response. This is a functional change in reachable core network code.",
  "WorthFuzzing": true
}

Results:
{
  "EnableConfigs": [
    "TCP_AO"
  ],
  "FocusSymbols": [
    "tcp_ao_hash_hdr",
    "tcp_ao_add_cmd"
  ],
  "Reasoning": "The patch fixes uninitialized memory in TCP AO options padding by adding a memset in tcp_v4_send_ack and tcp_v6_send_response. This is a functional change in reachable core network code.",
  "WorthFuzzing": true
}

LLM Calls Summary:
Total Calls Total Tokens Avg Tokens Total Duration (Seconds) Avg Duration (Seconds)
Tool Calls Summary:
Total Calls Total Duration (Seconds) Avg Duration (Seconds)