From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH] ipv4: Return EINVAL when ping_group_range sysctl doesn't map to user ns Date: Fri, 06 Jul 2018 11:52:13 +0900 (KST) Message-ID: <20180706.115213.1244805309957477961.davem@davemloft.net> References: <1530816563-4478-1-git-send-email-tyhicks@canonical.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, ebiederm@xmission.com, segoon@openwall.com, netdev@vger.kernel.org, containers@lists.linux-foundation.org, linux-kernel@vger.kernel.org To: tyhicks@canonical.com Return-path: In-Reply-To: <1530816563-4478-1-git-send-email-tyhicks@canonical.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org From: Tyler Hicks Date: Thu, 5 Jul 2018 18:49:23 +0000 > The low and high values of the net.ipv4.ping_group_range sysctl were > being silently forced to the default disabled state when a write to the > sysctl contained GIDs that didn't map to the associated user namespace. > Confusingly, the sysctl's write operation would return success and then > a subsequent read of the sysctl would indicate that the low and high > values are the overflowgid. > > This patch changes the behavior by clearly returning an error when the > sysctl write operation receives a GID range that doesn't map to the > associated user namespace. In such a situation, the previous value of > the sysctl is preserved and that range will be returned in a subsequent > read of the sysctl. > > Signed-off-by: Tyler Hicks Looks good to me, applied and queued up for -stable. Thanks.