From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (mail.openvz.org [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id 615BC803F6 for ; Tue, 10 Nov 2026 16:33:07 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6AAGVkTC016239; Tue, 10 Nov 2026 19:31:46 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AAGVkTC016239 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=default; t=1794328308; bh=fOn5rXfNmHwuIhBnMQu4nRw7gbSBclIt2RDW5d/lWEg=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe; b=Il3m0FB8sj5TTMLGOEF6OfcAz0b9RZpvf06mCTVijR2pslsZE6FxlDpBTFY6GpA4q PvD4f9UPfY1aCJ7YlPHSbjTqBKZaZSh/jQatc7I7mslaTK59R8aGa63ET4gErTk5xf BCEBRNFOJV7PPH5yiZ+ac6QZbwJzCbX8nXkW9bCdV9rIcua9otcIDX7EvpXm6aH4jl BD2W5/ip9wQR2ECpAygYxafW5ASrUqn3c37ogelmNVnY63YvyeYxFX+R2KFdUKLH+X Udw20WNc1krEs0z+iUg+w/sMbT+sc8blIvqThLUjgDvq1RiFTQqw6SYIJCtTgHyT0h 84BYV1Br1/FKg== Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6AAGVZcL016203 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Tue, 10 Nov 2026 19:31:35 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AAGVZcL016203 Authentication-Results: mail.openvz.org; dkim=pass (2048-bit key) header.d=openvz.org header.i=@openvz.org header.b="GgFhwUpH" Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-49166c8a60dso1688413f8f.0 for ; Tue, 10 Nov 2026 08:31:35 -0800 (PST) X-Gm-Message-State: APuU4Z8zpeeKhDEWC8cHAVLtUO+vOThjDoXalYCGxSIcO5C55XgZuDtY 5UQVLcXkM9I73aXICMK1PortXplnrCybfw5UUGbdhbNVp5PS3xXCwG9NITxR8Qslfe2Ev1iAlFD cfzepcZ0wr5hcKWRbOFNOJ/TNpl+aZGeGgLoA1mqNCmTxondi14v4zg== X-Gm-Gg: AYBFou3oWbO9Uga518Q2S7bLQ+8aYk7BKxYGT7S7qES6vszumx9u9jdpKuHL/76RwcL N96ZU3iWrDjUQM8DdDS51xS3NIIR8AEGhVm5eXY3ghSsMg8UCG5VmoxeUzlN9jgmIMK3cakQ18I Mkq+KpC0BKCZlgQkdGhfPumCPzorip/xHwt3iqyLcALzr5FPFd+47rYnXv9PYVUx/374LbgEnP4 JDOLyrUd9XH4J153NhdKYQj7L04Hcpw4ojyrs62CWRMr/2ak6az/3vWRJy4uwu93topKUyNA8xD 6FjevsiWgQ== X-Received: by 2002:a05:6000:2587:b0:499:81db:47a3 with SMTP id ffacd0b85a97d-49981db47f0mr433831f8f.11.1794328295331; Tue, 10 Nov 2026 08:31:35 -0800 (PST) X-Received: by 2002:a05:6000:2587:b0:499:81db:47a3 with SMTP id ffacd0b85a97d-49981db47f0mr433786f8f.11.1794328294849; Tue, 10 Nov 2026 08:31:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1794328294; cv=none; d=google.com; s=arc-20260327; b=H9211jNsOR1LVmDF7luiF13YAPVeUHvgA0oJP8Gb45xC0zcQ2g8nq1+1QlZOG1CZ16 LTGR7IdhsxHgbheJgXDrYfOvh9pl4Q9BTyACNMsE8lIHgjO3NgfHqRmEBStHldoWS/so DdAvhdnRPQ1JubZ0Mrme40WmalPHjXKFmk7cDWhVDFBZWH5oJDt4yZ0TDOsQYLLjX5vv ecftYb7LB1XvrlUTH8kf6L1Le8QSfeO5Wns4Sj/VNKM4MNN0E3AQroUPgvRxZNfeFFlX 46hGqGy44K2SaqJcuaUlFvVfdugQtMRXkcmal5FCf/E/6DfuGg4AlKbVDSx05Mm457Jz 3Pmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=3vAw4SgzNZ2KiVzisMs75BeA9FncaPJ6KbYphPIAzmQ=; fh=ozrYJQ1t3QIP6s65KBq5xgJxiFM2qf+5wwn3ABTusyU=; b=jZXPYrQghodvDDQgJHjf66iiL0r8rYfv1gcLx2HmTkSziMo2oEOf99B1uN8+Ob97++ MyKR1qpI3pV6yzQa05jC1isXhQ5oDUJ4u1XoEAyB0Cz0M3x4RtnSSUXqqGudo4itgI0N 2f34sxcjBUV1wrAUIgJEqcGLMZHoeHn61h13h2Pbv3ZfDFtHxMgVupCEqkHPtGp46BI/ 56KhzVvAcBjpaJYg0iGTxnSORipdnq2oapwhbcIBF6mLCt4okYiwUikbNEriNnaySr9M Z1o+xrwnkaS/xTwMVx3oTjY6xzOlIZWKGlyx1vJuCROFd2Ftv50ptUEItibUSeHqJ4Oq 44ZQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b=GgFhwUpH; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:4f78:6441:d0f1:22af as permitted sender) smtp.mailfrom=den@openvz.org; dara=neutral header.i=@openvz.org Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id ffacd0b85a97d-49832e0b1ebsor695499f8f.8.2026.11.10.08.31.34 for (Google Transport Security); Tue, 10 Nov 2026 08:31:34 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:4f78:6441:d0f1:22af as permitted sender) client-ip=2a06:5b06:b600:300:4f78:6441:d0f1:22af; Authentication-Results: mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b=GgFhwUpH; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:4f78:6441:d0f1:22af as permitted sender) smtp.mailfrom=den@openvz.org; dara=neutral header.i=@openvz.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=google; t=1794328294; x=1794933094; darn=openvz.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=3vAw4SgzNZ2KiVzisMs75BeA9FncaPJ6KbYphPIAzmQ=; b=GgFhwUpHBXrih/+/STfZId1mP6Z7Ftir2eMpm7/YYFnGO5ENuY56K9uIiYTyNvZOgm 8ema1gPXHTlQIqYP/ewFdErgz+tpuikbDBn6jjlEfjxODsA6535j+u6DXCU7JdKAcRXS TdzduN7G7sPMAb0XSvfoPjLU3wHfhBYlRR2AzLXMstdbNskHT3RVExV7uGDNeylmkbBA Xr9LOdkDibnpGjn3WAAEEpgHs1gSnvBf9cZ5q8MXItVvyw3LsBXFFVtBp7b6IJIqJWDS o9FHApZXXupyNBreCzsNL9vh0jjBDbZp423lzMBX3Ak3DjfRTKHmncQTsqvIMXL+yu9D 4eVw== X-Received: by 2002:a05:600c:3b11:b0:4a2:677:ad8e with SMTP id 5b1f17b1804b1-4ba02357922mr51654885e9.34.1794328294427; Tue, 10 Nov 2026 08:31:34 -0800 (PST) Received: from athena.sw.ru ([2a06:5b06:b600:300:4f78:6441:d0f1:22af]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4ba01fdac9csm108580235e9.0.2026.11.10.08.31.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2026 08:31:34 -0800 (PST) From: "Denis V. Lunev" To: khorenko@virtuozzo.com Date: Tue, 10 Nov 2026 17:31:26 +0100 Message-ID: <20261110163130.2776687-3-den@openvz.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261110163130.2776687-1-den@openvz.org> References: <20261110163130.2776687-1-den@openvz.org> MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.1 2/6] net/sit: fix a host panic deleting sit moved into a CT without sit X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org From: Denis V. Lunev sit_init_net() frees the sit_net of a netns whose VE lacks VE_FEATURE_SIT. Only the fallback sit0 is netns_immutable, so the host can move any other sit tunnel into such a container with "ip link set s6 netns ". ipip6_dellink() looks sitn up in dev_net(dev) and reads sitn->fb_tunnel_dev, so the node panics on a NULL pointer dereference when container root deletes the tunnel, when the container stops and cleanup_net() deletes it, or when sit is unloaded. Take sitn from t->net, the netns the tunnel was created in and is hashed in, as changelink, uninit and the ioctl handlers already do. The fallback device cannot leave its netns, so the fb_tunnel_dev comparison keeps its meaning. Fixes: 5aed376d130d ("net: Make sit feature optional") https://virtuozzo.atlassian.net/browse/VSTOR-154347 Feature: ve: per-CT features management Signed-off-by: Denis V. Lunev --- net/ipv6/sit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 36c6c7704f84..6aec5177fa4a 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c @@ -1772,8 +1772,8 @@ static const struct nla_policy ipip6_policy[IFLA_IPTUN_MAX + 1] = { static void ipip6_dellink(struct net_device *dev, struct list_head *head) { - struct net *net = dev_net(dev); - struct sit_net *sitn = net_generic(net, sit_net_id); + struct ip_tunnel *t = netdev_priv(dev); + struct sit_net *sitn = net_generic(t->net, sit_net_id); if (dev != sitn->fb_tunnel_dev) unregister_netdevice_queue(dev, head); -- 2.53.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel