OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: "Denis V. Lunev" <den@openvz.org>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1] net/ip6_gre: fix a host panic adding ip6gre in a CT without ipgre
Date: Thu, 05 Nov 2026 14:05:28 +0100	[thread overview]
Message-ID: <179388392864.2823727.6720156248130473834.b4-review@b4> (raw)
In-Reply-To: <20261104200755.1956316-1-den@openvz.org>

Applying as is.

On Wed, 4 Nov 2026 21:07:55 +0100, Denis V. Lunev wrote:
> -	ip6gre_netlink_parms(data, &nt->parms);
>  	ign = net_generic(net, ip6gre_net_id);
> +#ifdef CONFIG_VE
> +	if (!ign) /* no VE_FEATURE_IPGRE */
> +		return -EACCES;
> +#endif

- Please send a separate patch for ip6gre_dellink(), it has the same
  NULL ign. I have already created a task for it:
  https://virtuozzo.atlassian.net/browse/VSTOR-153615

ip6gre_dellink() takes ign from dev_net(dev), not from t->net as
changelink, uninit and the ioctl path do. Only the fallback device is
netns_immutable, and moving a device into another netns does not check
VE_FEATURE_IPGRE. So the host can do

    ip link add t6 type ip6gre local A remote B
    ip link set t6 netns <CT without ipgre>

and then "ip link del t6" in the CT, or just stopping the CT, reads
ign->fb_tunnel_dev through a NULL ign and oopses the node. Only kind
ip6gre has ->dellink, ip6gretap and ip6erspan are fine.

Taking ign from t->net there is enough, mainline did the same in
b7c0d393e108a ("ip6_gre: Unlink ip6gre_tunnel_unlink() from
->dellink().").

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

  parent reply	other threads:[~2026-11-05 13:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04 20:07 Denis V. Lunev
2026-11-04 20:31 ` no-reply
2026-11-05 13:05 ` Konstantin Khorenko [this message]
2026-11-05 13:05 ` Konstantin Khorenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179388392864.2823727.6720156248130473834.b4-review@b4 \
    --to=khorenko@virtuozzo.com \
    --cc=den@openvz.org \
    --cc=devel@openvz.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox