Message ID | 20241205002854.162490-2-pablo@netfilter.org |
---|---|
State | Accepted |
Headers | show |
Series | [net,1/6] ipvs: fix UB due to uninitialized stack access in ip_vs_protocol_init() | expand |
Hello: This series was applied to netdev/net.git (main) by Pablo Neira Ayuso <pablo@netfilter.org>: On Thu, 5 Dec 2024 01:28:49 +0100 you wrote: > From: Jinghao Jia <jinghao7@illinois.edu> > > Under certain kernel configurations when building with Clang/LLVM, the > compiler does not generate a return or jump as the terminator > instruction for ip_vs_protocol_init(), triggering the following objtool > warning during build time: > > [...] Here is the summary with links: - [net,1/6] ipvs: fix UB due to uninitialized stack access in ip_vs_protocol_init() https://git.kernel.org/netdev/net/c/146b6f1112eb - [net,2/6] netfilter: x_tables: fix LED ID check in led_tg_check() https://git.kernel.org/netdev/net/c/04317f4eb2aa - [net,3/6] netfilter: nft_socket: remove WARN_ON_ONCE on maximum cgroup level https://git.kernel.org/netdev/net/c/b7529880cb96 - [net,4/6] netfilter: nft_inner: incorrect percpu area handling under softirq https://git.kernel.org/netdev/net/c/7b1d83da254b - [net,5/6] netfilter: ipset: Hold module reference while requesting a module https://git.kernel.org/netdev/net/c/456f010bfaef - [net,6/6] netfilter: nft_set_hash: skip duplicated elements pending gc run https://git.kernel.org/netdev/net/c/7ffc7481153b You are awesome, thank you!
diff --git a/net/netfilter/ipvs/ip_vs_proto.c b/net/netfilter/ipvs/ip_vs_proto.c index f100da4ba3bc..a9fd1d3fc2cb 100644 --- a/net/netfilter/ipvs/ip_vs_proto.c +++ b/net/netfilter/ipvs/ip_vs_proto.c @@ -340,7 +340,7 @@ void __net_exit ip_vs_protocol_net_cleanup(struct netns_ipvs *ipvs) int __init ip_vs_protocol_init(void) { - char protocols[64]; + char protocols[64] = { 0 }; #define REGISTER_PROTOCOL(p) \ do { \ register_ip_vs_protocol(p); \ @@ -348,8 +348,6 @@ int __init ip_vs_protocol_init(void) strcat(protocols, (p)->name); \ } while (0) - protocols[0] = '\0'; - protocols[2] = '\0'; #ifdef CONFIG_IP_VS_PROTO_TCP REGISTER_PROTOCOL(&ip_vs_protocol_tcp); #endif