]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: fix offset of preference in backward compat option
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 26 Jan 2025 00:41:25 +0000 (09:41 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 26 Jan 2025 02:09:04 +0000 (11:09 +0900)
Fixes a bug introduced by a10d6e0124bb6e202baef9170b019e2e6a7af1fd.

Fixes oss-fuzz#391916479 (https://issues.oss-fuzz.com/issues/391916479).
Fixes #36172.

src/network/networkd-network-gperf.gperf
test/fuzz/fuzz-network-parser/oss-fuzz-391916479 [new file with mode: 0644]

index bf91f2c4c142b48e963049bbe700fc9a19a7b26b..83ef927b8b5809ddb67d965105f65ef1959f08de 100644 (file)
@@ -599,7 +599,7 @@ Network.DHCPv6PrefixDelegation,              config_parse_tristate,
 IPv6PrefixDelegation.RouterLifetimeSec,      config_parse_sec,                                         0,                             offsetof(Network, router_lifetime_usec)
 IPv6PrefixDelegation.Managed,                config_parse_bool,                                        0,                             offsetof(Network, router_managed)
 IPv6PrefixDelegation.OtherInformation,       config_parse_bool,                                        0,                             offsetof(Network, router_other_information)
-IPv6PrefixDelegation.RouterPreference,       config_parse_router_preference,                           0,                             0
+IPv6PrefixDelegation.RouterPreference,       config_parse_router_preference,                           0,                             offsetof(Network, router_preference)
 IPv6PrefixDelegation.EmitDNS,                config_parse_bool,                                        0,                             offsetof(Network, router_emit_dns)
 IPv6PrefixDelegation.DNS,                    config_parse_radv_dns,                                    0,                             0
 IPv6PrefixDelegation.EmitDomains,            config_parse_bool,                                        0,                             offsetof(Network, router_emit_domains)
diff --git a/test/fuzz/fuzz-network-parser/oss-fuzz-391916479 b/test/fuzz/fuzz-network-parser/oss-fuzz-391916479
new file mode 100644 (file)
index 0000000..b918d26
Binary files /dev/null and b/test/fuzz/fuzz-network-parser/oss-fuzz-391916479 differ