[CRIU] [PATCH 0/4] c/r non-dev net syctls
Andrei Vagin
avagin at gmail.com
Wed Jul 13 08:31:45 PDT 2016
On Wed, Jul 13, 2016 at 7:51 AM, Pavel Tikhomirov
<ptikhomirov at virtuozzo.com> wrote:
> Ok I found the problem:
>
> In Linux v4.3 commit df2cf4a78e48 ("IGMP: Inhibit reports for local
>[avagin at laptop linux-task-diag]$ git describe 87a8a2ae65b7
v4.5-rc2-377-g87a8a2a
multicast groups") sysctl igmp_link_local_mcast_reports was introduced in
> ipv4_net_table.
>
> And in ipv4_net_table it's data was initialized to point on
> sysctl_igmp_llm_reports variable. That was so before commit 87a8a2ae65b7
> ("igmp: Namespaceify igmp_llm_reports sysctl knob").
>
> So next it's data pointer is shifted to the offset of current netnamespace
> relative to init_net in ipv4_sysctl_init_net function. But that is
> completely wrong if variable is not net-namespaced, so we get random kernel
> address and can write/read to/from it one int, that can lead to memory
> corruption and crashes in random places in kernel.
>
> So conclusion is: we can not touch
> /proc/sys/net/ipv4/igmp_link_local_mcast_reports in v4.3-v4.5 between those
> two patches. So we need to drop its c/r and test if kernel is pre-v4.6.
[avagin at laptop linux-task-diag]$ git describe 87a8a2ae65b7
v4.5-rc2-377-g87a8a2a
It was fixed in 4.5, wasn't it?
>
> to @xemul: I do not know another way to check if the sysctl is alright
> except checking kernel version, is that acceptable?
>
> Simple reproduction:
> while :; do unshare -n echo 1999999 >
> /proc/sys/net/ipv4/igmp_link_local_mcast_reports; done
>
> --
> Best regards, Tikhomirov Pavel
> Software Developer, Virtuozzo.
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
More information about the CRIU
mailing list