| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/07/23 18:50 | flow | patch-triage |
0mArgs:null Results: {
"EnableConfigs": [
"OPENVSWITCH",
"NETFILTER_CONNCOUNT"
],
"FocusSymbols": [
"ovs_ct_limit_cmd_set",
"ovs_ct_limit_cmd_del",
"ovs_ct_limit_cmd_get",
"ovs_ct_check_limit",
"ovs_ct_limit_init",
"ovs_ct_limit_exit"
],
"Reasoning": "The patch fixes RCU synchronization and locking issues around the Open vSwitch connection tracking limit configuration. It modifies netlink command handlers and the connection tracking limit check function. Fuzzing should focus on these command handlers and the datapath connection tracking logic.",
"WorthFuzzing": true
} |
| 1/1 | 2026/07/23 18:50 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit a09ef3cdb45169b7b66e6afa81166143799b408f\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Thu Jul 23 18:50:44 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c\nindex 95697d4e16e64e..5c9a607d27a7b6 100644\n--- a/net/openvswitch/conntrack.c\n+++ b/net/openvswitch/conntrack.c\n@@ -933,10 +933,14 @@ static int ovs_ct_check_limit(struct net *net,\n \t\t\t const struct ovs_conntrack_info *info)\n {\n \tstruct ovs_net *ovs_net = net_generic(net, ovs_net_id);\n-\tconst struct ovs_ct_limit_info *ct_limit_info = ovs_net-\u003ect_limit_info;\n+\tconst struct ovs_ct_limit_info *ct_limit_info;\n \tu32 per_zone_limit, connections;\n \tu32 conncount_key;\n \n+\tct_limit_info = rcu_dereference(ovs_net-\u003ect_limit_info);\n+\tif (!ct_limit_info)\n+\t\treturn 0;\n+\n \tconncount_key = info-\u003ezone.id;\n \n \tper_zone_limit = ct_limit_get(ct_limit_info, info-\u003ezone.id);\n@@ -1585,40 +1589,47 @@ static void __ovs_ct_free_action(struct ovs_conntrack_info *ct_info)\n #if\tIS_ENABLED(CONFIG_NETFILTER_CONNCOUNT)\n static int ovs_ct_limit_init(struct net *net, struct ovs_net *ovs_net)\n {\n+\tstruct ovs_ct_limit_info *info;\n \tint i, err;\n \n-\tovs_net-\u003ect_limit_info = kmalloc_obj(*ovs_net-\u003ect_limit_info);\n-\tif (!ovs_net-\u003ect_limit_info)\n+\tinfo = kmalloc_obj(*info);\n+\tif (!info)\n \t\treturn -ENOMEM;\n \n-\tovs_net-\u003ect_limit_info-\u003edefault_limit = OVS_CT_LIMIT_DEFAULT;\n-\tovs_net-\u003ect_limit_info-\u003elimits =\n+\tinfo-\u003edefault_limit = OVS_CT_LIMIT_DEFAULT;\n+\tinfo-\u003elimits =\n \t\tkmalloc_objs(struct hlist_head, CT_LIMIT_HASH_BUCKETS);\n-\tif (!ovs_net-\u003ect_limit_info-\u003elimits) {\n-\t\tkfree(ovs_net-\u003ect_limit_info);\n+\tif (!info-\u003elimits) {\n+\t\tkfree(info);\n \t\treturn -ENOMEM;\n \t}\n \n \tfor (i = 0; i \u003c CT_LIMIT_HASH_BUCKETS; i++)\n-\t\tINIT_HLIST_HEAD(\u0026ovs_net-\u003ect_limit_info-\u003elimits[i]);\n+\t\tINIT_HLIST_HEAD(\u0026info-\u003elimits[i]);\n \n-\tovs_net-\u003ect_limit_info-\u003edata = nf_conncount_init(net, sizeof(u32));\n+\tinfo-\u003edata = nf_conncount_init(net, sizeof(u32));\n \n-\tif (IS_ERR(ovs_net-\u003ect_limit_info-\u003edata)) {\n-\t\terr = PTR_ERR(ovs_net-\u003ect_limit_info-\u003edata);\n-\t\tkfree(ovs_net-\u003ect_limit_info-\u003elimits);\n-\t\tkfree(ovs_net-\u003ect_limit_info);\n+\tif (IS_ERR(info-\u003edata)) {\n+\t\terr = PTR_ERR(info-\u003edata);\n+\t\tkfree(info-\u003elimits);\n+\t\tkfree(info);\n \t\tpr_err(\"openvswitch: failed to init nf_conncount %d\\n\", err);\n \t\treturn err;\n \t}\n+\trcu_assign_pointer(ovs_net-\u003ect_limit_info, info);\n \treturn 0;\n }\n \n static void ovs_ct_limit_exit(struct net *net, struct ovs_net *ovs_net)\n {\n-\tconst struct ovs_ct_limit_info *info = ovs_net-\u003ect_limit_info;\n+\tconst struct ovs_ct_limit_info *info;\n \tint i;\n \n+\tinfo = rcu_replace_pointer(ovs_net-\u003ect_limit_info, NULL,\n+\t\t\t\t lockdep_ovsl_is_held());\n+\t/* ovs_ct_check_limit() accesses the info under the datapath RCU lock. */\n+\tsynchronize_rcu();\n+\n \tnf_conncount_destroy(net, info-\u003edata);\n \tfor (i = 0; i \u003c CT_LIMIT_HASH_BUCKETS; ++i) {\n \t\tstruct hlist_head *head = \u0026info-\u003elimits[i];\n@@ -1678,9 +1689,7 @@ static int ovs_ct_limit_set_zone_limit(struct nlattr *nla_zone_limit,\n \twhile (rem \u003e= sizeof(*zone_limit)) {\n \t\tif (unlikely(zone_limit-\u003ezone_id ==\n \t\t\t\tOVS_ZONE_LIMIT_DEFAULT_ZONE)) {\n-\t\t\tovs_lock();\n \t\t\tinfo-\u003edefault_limit = zone_limit-\u003elimit;\n-\t\t\tovs_unlock();\n \t\t} else if (unlikely(!check_zone_id(\n \t\t\t\tzone_limit-\u003ezone_id, \u0026zone))) {\n \t\t\tOVS_NLERR(true, \"zone id is out of range\");\n@@ -1694,9 +1703,7 @@ static int ovs_ct_limit_set_zone_limit(struct nlattr *nla_zone_limit,\n \t\t\tct_limit-\u003ezone = zone;\n \t\t\tct_limit-\u003elimit = zone_limit-\u003elimit;\n \n-\t\t\tovs_lock();\n \t\t\tct_limit_set(info, ct_limit);\n-\t\t\tovs_unlock();\n \t\t}\n \t\trem -= NLA_ALIGN(sizeof(*zone_limit));\n \t\tzone_limit = (struct ovs_zone_limit *)((u8 *)zone_limit +\n@@ -1722,16 +1729,12 @@ static int ovs_ct_limit_del_zone_limit(struct nlattr *nla_zone_limit,\n \twhile (rem \u003e= sizeof(*zone_limit)) {\n \t\tif (unlikely(zone_limit-\u003ezone_id ==\n \t\t\t\tOVS_ZONE_LIMIT_DEFAULT_ZONE)) {\n-\t\t\tovs_lock();\n \t\t\tinfo-\u003edefault_limit = OVS_CT_LIMIT_DEFAULT;\n-\t\t\tovs_unlock();\n \t\t} else if (unlikely(!check_zone_id(\n \t\t\t\tzone_limit-\u003ezone_id, \u0026zone))) {\n \t\t\tOVS_NLERR(true, \"zone id is out of range\");\n \t\t} else {\n-\t\t\tovs_lock();\n \t\t\tct_limit_del(info, zone);\n-\t\t\tovs_unlock();\n \t\t}\n \t\trem -= NLA_ALIGN(sizeof(*zone_limit));\n \t\tzone_limit = (struct ovs_zone_limit *)((u8 *)zone_limit +\n@@ -1850,7 +1853,7 @@ static int ovs_ct_limit_cmd_set(struct sk_buff *skb, struct genl_info *info)\n \tstruct sk_buff *reply;\n \tstruct ovs_header *ovs_reply_header;\n \tstruct ovs_net *ovs_net = net_generic(sock_net(skb-\u003esk), ovs_net_id);\n-\tstruct ovs_ct_limit_info *ct_limit_info = ovs_net-\u003ect_limit_info;\n+\tstruct ovs_ct_limit_info *ct_limit_info;\n \tint err;\n \n \treply = ovs_ct_limit_cmd_reply_start(info, OVS_CT_LIMIT_CMD_SET,\n@@ -1863,16 +1866,22 @@ static int ovs_ct_limit_cmd_set(struct sk_buff *skb, struct genl_info *info)\n \t\tgoto exit_err;\n \t}\n \n+\tovs_lock();\n+\tct_limit_info = rcu_dereference_protected(ovs_net-\u003ect_limit_info,\n+\t\t\t\t\t\t lockdep_ovsl_is_held());\n \terr = ovs_ct_limit_set_zone_limit(a[OVS_CT_LIMIT_ATTR_ZONE_LIMIT],\n \t\t\t\t\t ct_limit_info);\n \tif (err)\n-\t\tgoto exit_err;\n+\t\tgoto exit_unlock;\n \n \tstatic_branch_enable(\u0026ovs_ct_limit_enabled);\n \n \tgenlmsg_end(reply, ovs_reply_header);\n+\tovs_unlock();\n \treturn genlmsg_reply(reply, info);\n \n+exit_unlock:\n+\tovs_unlock();\n exit_err:\n \tnlmsg_free(reply);\n \treturn err;\n@@ -1884,7 +1893,7 @@ static int ovs_ct_limit_cmd_del(struct sk_buff *skb, struct genl_info *info)\n \tstruct sk_buff *reply;\n \tstruct ovs_header *ovs_reply_header;\n \tstruct ovs_net *ovs_net = net_generic(sock_net(skb-\u003esk), ovs_net_id);\n-\tstruct ovs_ct_limit_info *ct_limit_info = ovs_net-\u003ect_limit_info;\n+\tstruct ovs_ct_limit_info *ct_limit_info;\n \tint err;\n \n \treply = ovs_ct_limit_cmd_reply_start(info, OVS_CT_LIMIT_CMD_DEL,\n@@ -1897,14 +1906,20 @@ static int ovs_ct_limit_cmd_del(struct sk_buff *skb, struct genl_info *info)\n \t\tgoto exit_err;\n \t}\n \n+\tovs_lock();\n+\tct_limit_info = rcu_dereference_protected(ovs_net-\u003ect_limit_info,\n+\t\t\t\t\t\t lockdep_ovsl_is_held());\n \terr = ovs_ct_limit_del_zone_limit(a[OVS_CT_LIMIT_ATTR_ZONE_LIMIT],\n \t\t\t\t\t ct_limit_info);\n \tif (err)\n-\t\tgoto exit_err;\n+\t\tgoto exit_unlock;\n \n \tgenlmsg_end(reply, ovs_reply_header);\n+\tovs_unlock();\n \treturn genlmsg_reply(reply, info);\n \n+exit_unlock:\n+\tovs_unlock();\n exit_err:\n \tnlmsg_free(reply);\n \treturn err;\n@@ -1918,7 +1933,7 @@ static int ovs_ct_limit_cmd_get(struct sk_buff *skb, struct genl_info *info)\n \tstruct ovs_header *ovs_reply_header;\n \tstruct net *net = sock_net(skb-\u003esk);\n \tstruct ovs_net *ovs_net = net_generic(net, ovs_net_id);\n-\tstruct ovs_ct_limit_info *ct_limit_info = ovs_net-\u003ect_limit_info;\n+\tstruct ovs_ct_limit_info *ct_limit_info;\n \tint err;\n \n \treply = ovs_ct_limit_cmd_reply_start(info, OVS_CT_LIMIT_CMD_GET,\n@@ -1932,23 +1947,29 @@ static int ovs_ct_limit_cmd_get(struct sk_buff *skb, struct genl_info *info)\n \t\tgoto exit_err;\n \t}\n \n+\tovs_lock();\n+\tct_limit_info = rcu_dereference_protected(ovs_net-\u003ect_limit_info,\n+\t\t\t\t\t\t lockdep_ovsl_is_held());\n \tif (a[OVS_CT_LIMIT_ATTR_ZONE_LIMIT]) {\n \t\terr = ovs_ct_limit_get_zone_limit(\n \t\t\tnet, a[OVS_CT_LIMIT_ATTR_ZONE_LIMIT], ct_limit_info,\n \t\t\treply);\n \t\tif (err)\n-\t\t\tgoto exit_err;\n+\t\t\tgoto exit_unlock;\n \t} else {\n \t\terr = ovs_ct_limit_get_all_zone_limit(net, ct_limit_info,\n \t\t\t\t\t\t reply);\n \t\tif (err)\n-\t\t\tgoto exit_err;\n+\t\t\tgoto exit_unlock;\n \t}\n \n \tnla_nest_end(reply, nla_reply);\n \tgenlmsg_end(reply, ovs_reply_header);\n+\tovs_unlock();\n \treturn genlmsg_reply(reply, info);\n \n+exit_unlock:\n+\tovs_unlock();\n exit_err:\n \tnlmsg_free(reply);\n \treturn err;\ndiff --git a/net/openvswitch/datapath.h b/net/openvswitch/datapath.h\nindex 696640e88fa7e3..93e11e468d173f 100644\n--- a/net/openvswitch/datapath.h\n+++ b/net/openvswitch/datapath.h\n@@ -172,7 +172,7 @@ struct ovs_net {\n \tstruct work_struct dp_notify_work;\n \tstruct delayed_work masks_rebalance;\n #if\tIS_ENABLED(CONFIG_NETFILTER_CONNCOUNT)\n-\tstruct ovs_ct_limit_info *ct_limit_info;\n+\tstruct ovs_ct_limit_info __rcu *ct_limit_info;\n #endif\n \tbool xt_label;\n };\n"
} |
| 2/1 | 2026/07/23 18:50 | agent | patch-evaluator |
0mModel:best-expensive Args: null Results: {
"EnableConfigs": [
"OPENVSWITCH",
"NETFILTER_CONNCOUNT"
],
"FocusSymbols": [
"ovs_ct_limit_cmd_set",
"ovs_ct_limit_cmd_del",
"ovs_ct_limit_cmd_get",
"ovs_ct_check_limit",
"ovs_ct_limit_init",
"ovs_ct_limit_exit"
],
"Reasoning": "The patch fixes RCU synchronization and locking issues around the Open vSwitch connection tracking limit configuration. It modifies netlink command handlers and the connection tracking limit check function. Fuzzing should focus on these command handlers and the datapath connection tracking logic.",
"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 a09ef3cdb45169b7b66e6afa81166143799b408f
Author: syz-cluster <triage@syzkaller.com>
Date: Thu Jul 23 18:50:44 2026 +0000
syz-cluster: applied patch under review
diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c
index 95697d4e16e64e..5c9a607d27a7b6 100644
--- a/net/openvswitch/conntrack.c
+++ b/net/openvswitch/conntrack.c
@@ -933,10 +933,14 @@ static int ovs_ct_check_limit(struct net *net,
const struct ovs_conntrack_info *info)
{
struct ovs_net *ovs_net = net_generic(net, ovs_net_id);
- const struct ovs_ct_limit_info *ct_limit_info = ovs_net->ct_limit_info;
+ const struct ovs_ct_limit_info *ct_limit_info;
u32 per_zone_limit, connections;
u32 conncount_key;
+ ct_limit_info = rcu_dereference(ovs_net->ct_limit_info);
+ if (!ct_limit_info)
+ return 0;
+
conncount_key = info->zone.id;
per_zone_limit = ct_limit_get(ct_limit_info, info->zone.id);
@@ -1585,40 +1589,47 @@ static void __ovs_ct_free_action(struct ovs_conntrack_info *ct_info)
#if IS_ENABLED(CONFIG_NETFILTER_CONNCOUNT)
static int ovs_ct_limit_init(struct net *net, struct ovs_net *ovs_net)
{
+ struct ovs_ct_limit_info *info;
int i, err;
- ovs_net->ct_limit_info = kmalloc_obj(*ovs_net->ct_limit_info);
- if (!ovs_net->ct_limit_info)
+ info = kmalloc_obj(*info);
+ if (!info)
return -ENOMEM;
- ovs_net->ct_limit_info->default_limit = OVS_CT_LIMIT_DEFAULT;
- ovs_net->ct_limit_info->limits =
+ info->default_limit = OVS_CT_LIMIT_DEFAULT;
+ info->limits =
kmalloc_objs(struct hlist_head, CT_LIMIT_HASH_BUCKETS);
- if (!ovs_net->ct_limit_info->limits) {
- kfree(ovs_net->ct_limit_info);
+ if (!info->limits) {
+ kfree(info);
return -ENOMEM;
}
for (i = 0; i < CT_LIMIT_HASH_BUCKETS; i++)
- INIT_HLIST_HEAD(&ovs_net->ct_limit_info->limits[i]);
+ INIT_HLIST_HEAD(&info->limits[i]);
- ovs_net->ct_limit_info->data = nf_conncount_init(net, sizeof(u32));
+ info->data = nf_conncount_init(net, sizeof(u32));
- if (IS_ERR(ovs_net->ct_limit_info->data)) {
- err = PTR_ERR(ovs_net->ct_limit_info->data);
- kfree(ovs_net->ct_limit_info->limits);
- kfree(ovs_net->ct_limit_info);
+ if (IS_ERR(info->data)) {
+ err = PTR_ERR(info->data);
+ kfree(info->limits);
+ kfree(info);
pr_err("openvswitch: failed to init nf_conncount %d\n", err);
return err;
}
+ rcu_assign_pointer(ovs_net->ct_limit_info, info);
return 0;
}
static void ovs_ct_limit_exit(struct net *net, struct ovs_net *ovs_net)
{
- const struct ovs_ct_limit_info *info = ovs_net->ct_limit_info;
+ const struct ovs_ct_limit_info *info;
int i;
+ info = rcu_replace_pointer(ovs_net->ct_limit_info, NULL,
+ lockdep_ovsl_is_held());
+ /* ovs_ct_check_limit() accesses the info under the datapath RCU lock. */
+ synchronize_rcu();
+
nf_conncount_destroy(net, info->data);
for (i = 0; i < CT_LIMIT_HASH_BUCKETS; ++i) {
struct hlist_head *head = &info->limits[i];
@@ -1678,9 +1689,7 @@ static int ovs_ct_limit_set_zone_limit(struct nlattr *nla_zone_limit,
while (rem >= sizeof(*zone_limit)) {
if (unlikely(zone_limit->zone_id ==
OVS_ZONE_LIMIT_DEFAULT_ZONE)) {
- ovs_lock();
info->default_limit = zone_limit->limit;
- ovs_unlock();
} else if (unlikely(!check_zone_id(
zone_limit->zone_id, &zone))) {
OVS_NLERR(true, "zone id is out of range");
@@ -1694,9 +1703,7 @@ static int ovs_ct_limit_set_zone_limit(struct nlattr *nla_zone_limit,
ct_limit->zone = zone;
ct_limit->limit = zone_limit->limit;
- ovs_lock();
ct_limit_set(info, ct_limit);
- ovs_unlock();
}
rem -= NLA_ALIGN(sizeof(*zone_limit));
zone_limit = (struct ovs_zone_limit *)((u8 *)zone_limit +
@@ -1722,16 +1729,12 @@ static int ovs_ct_limit_del_zone_limit(struct nlattr *nla_zone_limit,
while (rem >= sizeof(*zone_limit)) {
if (unlikely(zone_limit->zone_id ==
OVS_ZONE_LIMIT_DEFAULT_ZONE)) {
- ovs_lock();
info->default_limit = OVS_CT_LIMIT_DEFAULT;
- ovs_unlock();
} else if (unlikely(!check_zone_id(
zone_limit->zone_id, &zone))) {
OVS_NLERR(true, "zone id is out of range");
} else {
- ovs_lock();
ct_limit_del(info, zone);
- ovs_unlock();
}
rem -= NLA_ALIGN(sizeof(*zone_limit));
zone_limit = (struct ovs_zone_limit *)((u8 *)zone_limit +
@@ -1850,7 +1853,7 @@ static int ovs_ct_limit_cmd_set(struct sk_buff *skb, struct genl_info *info)
struct sk_buff *reply;
struct ovs_header *ovs_reply_header;
struct ovs_net *ovs_net = net_generic(sock_net(skb->sk), ovs_net_id);
- struct ovs_ct_limit_info *ct_limit_info = ovs_net->ct_limit_info;
+ struct ovs_ct_limit_info *ct_limit_info;
int err;
reply = ovs_ct_limit_cmd_reply_start(info, OVS_CT_LIMIT_CMD_SET,
@@ -1863,16 +1866,22 @@ static int ovs_ct_limit_cmd_set(struct sk_buff *skb, struct genl_info *info)
goto exit_err;
}
+ ovs_lock();
+ ct_limit_info = rcu_dereference_protected(ovs_net->ct_limit_info,
+ lockdep_ovsl_is_held());
err = ovs_ct_limit_set_zone_limit(a[OVS_CT_LIMIT_ATTR_ZONE_LIMIT],
ct_limit_info);
if (err)
- goto exit_err;
+ goto exit_unlock;
static_branch_enable(&ovs_ct_limit_enabled);
genlmsg_end(reply, ovs_reply_header);
+ ovs_unlock();
return genlmsg_reply(reply, info);
+exit_unlock:
+ ovs_unlock();
exit_err:
nlmsg_free(reply);
return err;
@@ -1884,7 +1893,7 @@ static int ovs_ct_limit_cmd_del(struct sk_buff *skb, struct genl_info *info)
struct sk_buff *reply;
struct ovs_header *ovs_reply_header;
struct ovs_net *ovs_net = net_generic(sock_net(skb->sk), ovs_net_id);
- struct ovs_ct_limit_info *ct_limit_info = ovs_net->ct_limit_info;
+ struct ovs_ct_limit_info *ct_limit_info;
int err;
reply = ovs_ct_limit_cmd_reply_start(info, OVS_CT_LIMIT_CMD_DEL,
@@ -1897,14 +1906,20 @@ static int ovs_ct_limit_cmd_del(struct sk_buff *skb, struct genl_info *info)
goto exit_err;
}
+ ovs_lock();
+ ct_limit_info = rcu_dereference_protected(ovs_net->ct_limit_info,
+ lockdep_ovsl_is_held());
err = ovs_ct_limit_del_zone_limit(a[OVS_CT_LIMIT_ATTR_ZONE_LIMIT],
ct_limit_info);
if (err)
- goto exit_err;
+ goto exit_unlock;
genlmsg_end(reply, ovs_reply_header);
+ ovs_unlock();
return genlmsg_reply(reply, info);
+exit_unlock:
+ ovs_unlock();
exit_err:
nlmsg_free(reply);
return err;
@@ -1918,7 +1933,7 @@ static int ovs_ct_limit_cmd_get(struct sk_buff *skb, struct genl_info *info)
struct ovs_header *ovs_reply_header;
struct net *net = sock_net(skb->sk);
struct ovs_net *ovs_net = net_generic(net, ovs_net_id);
- struct ovs_ct_limit_info *ct_limit_info = ovs_net->ct_limit_info;
+ struct ovs_ct_limit_info *ct_limit_info;
int err;
reply = ovs_ct_limit_cmd_reply_start(info, OVS_CT_LIMIT_CMD_GET,
@@ -1932,23 +1947,29 @@ static int ovs_ct_limit_cmd_get(struct sk_buff *skb, struct genl_info *info)
goto exit_err;
}
+ ovs_lock();
+ ct_limit_info = rcu_dereference_protected(ovs_net->ct_limit_info,
+ lockdep_ovsl_is_held());
if (a[OVS_CT_LIMIT_ATTR_ZONE_LIMIT]) {
err = ovs_ct_limit_get_zone_limit(
net, a[OVS_CT_LIMIT_ATTR_ZONE_LIMIT], ct_limit_info,
reply);
if (err)
- goto exit_err;
+ goto exit_unlock;
} else {
err = ovs_ct_limit_get_all_zone_limit(net, ct_limit_info,
reply);
if (err)
- goto exit_err;
+ goto exit_unlock;
}
nla_nest_end(reply, nla_reply);
genlmsg_end(reply, ovs_reply_header);
+ ovs_unlock();
return genlmsg_reply(reply, info);
+exit_unlock:
+ ovs_unlock();
exit_err:
nlmsg_free(reply);
return err;
diff --git a/net/openvswitch/datapath.h b/net/openvswitch/datapath.h
index 696640e88fa7e3..93e11e468d173f 100644
--- a/net/openvswitch/datapath.h
+++ b/net/openvswitch/datapath.h
@@ -172,7 +172,7 @@ struct ovs_net {
struct work_struct dp_notify_work;
struct delayed_work masks_rebalance;
#if IS_ENABLED(CONFIG_NETFILTER_CONNCOUNT)
- struct ovs_ct_limit_info *ct_limit_info;
+ struct ovs_ct_limit_info __rcu *ct_limit_info;
#endif
bool xt_label;
};
|
| 3/2 | 2026/07/23 18:50 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 5176 output: 33 thoughts: 400 Thoughts: **Analyzing the Connection Tracking Limit Patch in Open vSwitch** Okay, so I'm looking at a patch that tweaks the connection tracking limit logic in `net/openvswitch/conntrack.c` and `net/openvswitch/datapath.h`. The core change seems to be around how `ct_limit_info` is accessed. They're using RCU now – `rcu_dereference`, `rcu_assign_pointer`, `rcu_replace_pointer` – which immediately tells me this is about improving concurrency and avoiding race conditions. They’ve also moved `ovs_lock()` around within the command handling functions: `ovs_ct_limit_cmd_set`, `ovs_ct_limit_cmd_del`, and `ovs_ct_limit_cmd_get`. That's interesting, I need to understand why. There's a potential memory leak or initialization issue being addressed in `ovs_ct_limit_init`. Good catch; that's the kind of thing that can bite you later. Looks like they're using a local pointer before assigning it, which might be the fix. Functionally, this is a change to the connection tracking limit logic within Open vSwitch. Given the RCU changes, the lock movements, and the memory fix, I'd say this patch screams "needs fuzzing." Let's identify the key functions to target. Based on the code changes and the overall intent, the functions I need to focus on are: * `ovs_ct_check_limit` – Core limit checking * `ovs_ct_limit_init` – The init function. * `ovs_ct_limit_exit` – The exit function, equally important. * `ovs_ct_limit_set_zone_limit` – Setting zone limits * `ovs_ct_limit_del_zone_limit` – Deleting zone limits. * `ovs_ct_limit_cmd_set` – Command setting * `ovs_ct_limit_cmd_del` – Command deleting * `ovs_ct_limit_cmd_get` – Command getting I need to make sure I have the right configuration to exercise this code. Looking at the code, it's clear that it uses `#if IS_ENABLED(CONFIG_NETFILTER_CONNCOUNT)`, which means `NETFILTER_CONNCOUNT` must be enabled. Since it's Open vSwitch, obviously I need `OPENVSWITCH`, and I'll double check to see if `OPENVSWITCH_CONNTRACK` is also a relevant config option. |
| 4/2 | 2026/07/23 18:50 | tool | grepper |
0mArgs:{
"Expression": "config OPENVSWITCH",
"PathPrefix": "net/openvswitch/Kconfig"
}Results: {
"Output": "net/openvswitch/Kconfig-5-\nnet/openvswitch/Kconfig:6:config OPENVSWITCH\nnet/openvswitch/Kconfig-7-\ttristate \"Open vSwitch\"\n--\nnet/openvswitch/Kconfig-43-\nnet/openvswitch/Kconfig:44:config OPENVSWITCH_GRE\nnet/openvswitch/Kconfig-45-\ttristate \"Open vSwitch GRE tunneling support\"\n--\nnet/openvswitch/Kconfig-56-\nnet/openvswitch/Kconfig:57:config OPENVSWITCH_VXLAN\nnet/openvswitch/Kconfig-58-\ttristate \"Open vSwitch VXLAN tunneling support\"\n--\nnet/openvswitch/Kconfig-68-\nnet/openvswitch/Kconfig:69:config OPENVSWITCH_GENEVE\nnet/openvswitch/Kconfig-70-\ttristate \"Open vSwitch Geneve tunneling support\"\n"
} |
| 5/2 | 2026/07/23 18:50 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 6429 output: 36 thoughts: 17 Thoughts: Here's a summary of my thought process, tailored for an expert like you: **Checking for the OPENVSWITCH_CONTRACK Configuration** Okay, first things first, before diving into any complex troubleshooting or configuration changes, let's establish a baseline. I need to quickly confirm whether the `OPENVSWITCH_CONTRACK` configuration is even present. It’s a pretty fundamental setting, and its absence could immediately explain some potential issues with connection tracking and, by extension, network performance or security within the Open vSwitch environment. A quick check here saves time in the long run; no point pursuing other avenues if a basic prerequisite isn't met. I'll need to know whether I need to enable this, or if it has already been enabled and needs to be looked at in more depth. |
| 6/2 | 2026/07/23 18:50 | tool | grepper |
0mError:no matches Args: {
"Expression": "config OPENVSWITCH_CONNTRACK",
"PathPrefix": "net/openvswitch/Kconfig"
}Results: {
"error": "no matches"
} |
| 7/2 | 2026/07/23 18:50 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 6664 output: 30 thoughts: 24 Thoughts: Okay, here's my summary, tailored for an expert audience, in the first person: **Investigating Connection Tracking Options** Alright, I need to pinpoint where the connection tracking configuration lives within the Open vSwitch build system. My instinct says to start with `net/openvswitch/Kconfig`. That's the logical place for build-time options related to networking features within the kernel module space. Now, what am I looking for specifically? I'm keying in on two options: `CONNTRACK` and `NETFILTER`. These are the most likely candidates for influencing connection tracking behavior or enabling integration with Netfilter. Going to dive in and see what the Kconfig has to say. |
| 8/2 | 2026/07/23 18:51 | tool | grepper |
0mArgs:{
"Expression": "NETFILTER",
"PathPrefix": "net/openvswitch/Kconfig"
}Results: {
"Output": "net/openvswitch/Kconfig=6=config OPENVSWITCH\n--\nnet/openvswitch/Kconfig-11-\t\t\t\t (!NF_NAT || NF_NAT) \u0026\u0026 \\\nnet/openvswitch/Kconfig:12:\t\t\t\t (!NETFILTER_CONNCOUNT || NETFILTER_CONNCOUNT)))\nnet/openvswitch/Kconfig-13-\tdepends on PSAMPLE || !PSAMPLE\n"
} |
| 9/2 | 2026/07/23 18:51 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 6971 output: 27 thoughts: 87 Thoughts: **My Analysis of Open vSwitch and Connection Tracking** Okay, so I'm looking at this `OPENVSWITCH` module and its connection tracking capabilities. It seems that `OPENVSWITCH` *depends* on `NETFILTER_CONNCOUNT`, but the actual implementation, specifically within `net/openvswitch/conntrack.c`, is using a preprocessor directive, `#if IS_ENABLED(CONFIG_NETFILTER_CONNCOUNT)`, to control its inclusion. This means it *requires* both `OPENVSWITCH` *and* `NETFILTER_CONNCOUNT` to function properly, even if the dependency isn't explicitly stated as a hard requirement. It's using `CONFIG_NETFILTER_CONNCOUNT`, so it really needs it to be enabled. My next step is to perform a thorough code review to check if `OPENVSWITCH_CONTRACK` is explicitly used anywhere else within the codebase. I need to get the bigger picture of how that configuration variable impacts the behavior of the program. |
| 10/2 | 2026/07/23 18:51 | tool | grepper |
0mError:no matches Args: {
"Expression": "OPENVSWITCH_CONTRACK",
"PathPrefix": ""
}Results: {
"error": "no matches"
} |
| 11/2 | 2026/07/23 18:51 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 7314 output: 36 thoughts: 118 Thoughts: **Analyzing Connection Tracking Limits in Open vSwitch** Alright, so the key configurations to focus on here are definitely `NETFILTER_CONNCOUNT` and `OPENVSWITCH`. That feels like a solid starting point. Now, let's drill down into the core functions that handle this connection tracking limit functionality. My focus needs to be on: * `ovs_ct_limit_cmd_set` * `ovs_ct_limit_cmd_del` * `ovs_ct_limit_cmd_get` * `ovs_ct_check_limit` Those seem like the logical points of interaction with the system. I need to make sure that `ovs_ct_limit_cmd_set` is reachable, as a netlink command handler. It's a key part of the API. |
| 12/2 | 2026/07/23 18:51 | tool | grepper |
0mArgs:{
"Expression": "ovs_ct_limit_cmd_set",
"PathPrefix": "net/openvswitch/"
}Results: {
"Output": "net/openvswitch/conntrack.c=1822=static int ovs_ct_limit_get_all_zone_limit(struct net *net,\n--\nnet/openvswitch/conntrack.c-1849-\nnet/openvswitch/conntrack.c:1850:static int ovs_ct_limit_cmd_set(struct sk_buff *skb, struct genl_info *info)\nnet/openvswitch/conntrack.c-1851-{\n--\nnet/openvswitch/conntrack.c=1978=static const struct genl_small_ops ct_limit_genl_ops[] = {\n--\nnet/openvswitch/conntrack.c-1983-\t\t\t\t\t */\nnet/openvswitch/conntrack.c:1984:\t\t.doit = ovs_ct_limit_cmd_set,\nnet/openvswitch/conntrack.c-1985-\t},\n"
} |
| 13/2 | 2026/07/23 18:51 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 7903 output: 34 thoughts: 26 Thoughts: Here's my thought process, as if I were analyzing that prompt: **Analyzing the Request: Netlink Command Handler Context** Okay, so the prompt indicates we're dealing with a netlink command handler. That's a key piece of information. This suggests we're working at a low level, probably within a kernel context or a system program that interacts directly with the kernel's netlink interface. I need to keep that in mind as I interpret the following information. Netlink is all about efficient inter-process communication, especially for network configuration and control. Next, it points towards `ovs_ct_check_limit`. The inclusion of `ovs_` implies this is related to Open vSwitch, which is further helpful context. The function name `ovs_ct_check_limit` strongly suggests we are dealing with connection tracking, likely within the context of Open vSwitch's flow table management. And "limit" implies that function would be related to rate limiting or resource exhaustion protection. This specific function is a control plane function, related to processing instructions for the datapath. I want to look at its use, parameters and dependencies. |
| 14/2 | 2026/07/23 18:51 | tool | grepper |
0mArgs:{
"Expression": "ovs_ct_check_limit",
"PathPrefix": "net/openvswitch/"
}Results: {
"Output": "net/openvswitch/conntrack.c=917=static u32 ct_limit_get(const struct ovs_ct_limit_info *info, u16 zone)\n--\nnet/openvswitch/conntrack.c-930-\nnet/openvswitch/conntrack.c:931:static int ovs_ct_check_limit(struct net *net,\nnet/openvswitch/conntrack.c-932-\t\t\t const struct sk_buff *skb,\n--\nnet/openvswitch/conntrack.c=961=static int ovs_ct_commit(struct net *net, struct sw_flow_key *key,\n--\nnet/openvswitch/conntrack.c-980-\t\tif (!nf_ct_is_confirmed(ct)) {\nnet/openvswitch/conntrack.c:981:\t\t\terr = ovs_ct_check_limit(net, skb, info);\nnet/openvswitch/conntrack.c-982-\t\t\tif (err) {\n--\nnet/openvswitch/conntrack.c=1623=static void ovs_ct_limit_exit(struct net *net, struct ovs_net *ovs_net)\n--\nnet/openvswitch/conntrack.c-1629-\t\t\t\t lockdep_ovsl_is_held());\nnet/openvswitch/conntrack.c:1630:\t/* ovs_ct_check_limit() accesses the info under the datapath RCU lock. */\nnet/openvswitch/conntrack.c-1631-\tsynchronize_rcu();\n"
} |
| 15/2 | 2026/07/23 18:51 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 8621 output: 166 thoughts: 139 Thoughts: Okay, here's my understanding, tailored for an expert audience, as if it were my own thought process: **Fixing the RCU Handling and Locking for ct_limit_info in Open vSwitch Connection Tracking** Right, so this patch is crucial for the connection tracking (ct) module within Open vSwitch, specifically targeting the `ct_limit_info` data structure. It looks like the issue stems from problems with Read-Copy-Update (RCU) synchronization and related locking mechanisms. This is critical for any concurrent data structures, so a bug there means potential race conditions, data corruption, or even kernel panics. From the description, the fix is probably essential to ensure data consistency when multiple threads or cores are operating on these connection limits simultaneously. The configurations involved are `OPENVSWITCH` and `NETFILTER_CONNCOUNT`, which, of course, means this is specifically relevant when Open vSwitch is compiled and deployed with connection count functionality enabled – a common scenario, obviously. Now, focusing on the core functions mentioned, they are the key to my analysis: `ovs_ct_limit_cmd_set`, `ovs_ct_limit_cmd_del`, `ovs_ct_limit_cmd_get`, `ovs_ct_check_limit`, `ovs_ct_limit_init`, and `ovs_ct_limit_exit`. These represent the primary operations: setting, deleting, and getting limit configurations, checking whether limits are exceeded, and initializing and exiting the limit-related resources. The fix must be working to address race conditions that are likely to occur in all of these functions. I’ll need to delve into the code to really understand the original flaw and the precise locking strategy implemented to resolve it. Finally, I’ll need to process the results of testing this patch using `set-results`. Hopefully, it's comprehensive enough to validate the locking improvements and rule out potential regressions. This means I'm expecting detailed output regarding lock contention, RCU grace period usage, and any potential performance impacts. |
| 16/2 | 2026/07/23 18:51 | tool | set-results |
0mArgs:{
"EnableConfigs": [
"OPENVSWITCH",
"NETFILTER_CONNCOUNT"
],
"FocusSymbols": [
"ovs_ct_limit_cmd_set",
"ovs_ct_limit_cmd_del",
"ovs_ct_limit_cmd_get",
"ovs_ct_check_limit",
"ovs_ct_limit_init",
"ovs_ct_limit_exit"
],
"Reasoning": "The patch fixes RCU synchronization and locking issues around the Open vSwitch connection tracking limit configuration. It modifies netlink command handlers and the connection tracking limit check function. Fuzzing should focus on these command handlers and the datapath connection tracking logic.",
"WorthFuzzing": true
}Results: {
"EnableConfigs": [
"OPENVSWITCH",
"NETFILTER_CONNCOUNT"
],
"FocusSymbols": [
"ovs_ct_limit_cmd_set",
"ovs_ct_limit_cmd_del",
"ovs_ct_limit_cmd_get",
"ovs_ct_check_limit",
"ovs_ct_limit_init",
"ovs_ct_limit_exit"
],
"Reasoning": "The patch fixes RCU synchronization and locking issues around the Open vSwitch connection tracking limit configuration. It modifies netlink command handlers and the connection tracking limit check function. Fuzzing should focus on these command handlers and the datapath connection tracking logic.",
"WorthFuzzing": true
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|