Message ID | 20211021100821.964677-2-pablo@netfilter.org |
---|---|
State | Accepted |
Delegated to: | Pablo Neira |
Headers | show |
Series | [net,1/8] netfilter: xt_IDLETIMER: fix panic that occurs when timer_type has garbage value | expand |
Hello: This series was applied to netdev/net.git (master) by Pablo Neira Ayuso <pablo@netfilter.org>: On Thu, 21 Oct 2021 12:08:14 +0200 you wrote: > From: Juhee Kang <claudiajkang@gmail.com> > > Currently, when the rule related to IDLETIMER is added, idletimer_tg timer > structure is initialized by kmalloc on executing idletimer_tg_create > function. However, in this process timer->timer_type is not defined to > a specific value. Thus, timer->timer_type has garbage value and it occurs > kernel panic. So, this commit fixes the panic by initializing > timer->timer_type using kzalloc instead of kmalloc. > > [...] Here is the summary with links: - [net,1/8] netfilter: xt_IDLETIMER: fix panic that occurs when timer_type has garbage value https://git.kernel.org/netdev/net/c/902c0b188752 - [net,2/8] netfilter: Kconfig: use 'default y' instead of 'm' for bool config option https://git.kernel.org/netdev/net/c/77076934afdc - [net,3/8] netfilter: nf_tables: skip netdev events generated on netns removal https://git.kernel.org/netdev/net/c/68a3765c659f - [net,4/8] selftests: nft_nat: add udp hole punch test case https://git.kernel.org/netdev/net/c/465f15a6d1a8 - [net,5/8] netfilter: ip6t_rt: fix rt0_hdr parsing in rt_mt6 https://git.kernel.org/netdev/net/c/a482c5e00a9b - [net,6/8] netfilter: ipvs: make global sysctl readonly in non-init netns https://git.kernel.org/netdev/net/c/174c37627894 - [net,7/8] selftests: netfilter: remove stray bash debug line https://git.kernel.org/netdev/net/c/3e6ed7703dae - [net,8/8] netfilter: ebtables: allocate chainstack on CPU local nodes https://git.kernel.org/netdev/net/c/d9aaaf223297 You are awesome, thank you!
diff --git a/net/netfilter/xt_IDLETIMER.c b/net/netfilter/xt_IDLETIMER.c index 7b2f359bfce4..2f7cf5ecebf4 100644 --- a/net/netfilter/xt_IDLETIMER.c +++ b/net/netfilter/xt_IDLETIMER.c @@ -137,7 +137,7 @@ static int idletimer_tg_create(struct idletimer_tg_info *info) { int ret; - info->timer = kmalloc(sizeof(*info->timer), GFP_KERNEL); + info->timer = kzalloc(sizeof(*info->timer), GFP_KERNEL); if (!info->timer) { ret = -ENOMEM; goto out;