All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
From: no-reply@sashiko.virtuozzo.com
To: "Denis V. Lunev" <den@openvz.org>, khorenko@virtuozzo.com
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: Wed, 4 Nov 2026 20:31:02 +0000	[thread overview]
Message-ID: <010701a1a8420875-d0f18d8f-85ba-4933-9e33-4ac36ccea483-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261104200755.1956316-1-den@openvz.org>

> From: Denis V. Lunev <den@openvz.org>
> 
> ip6gre_init_net() frees the ip6gre_net of a netns whose VE lacks
> VE_FEATURE_IPGRE, and ip6gre_newlink_common() refuses such a netns with
> -EACCES. ip6gre_newlink() and ip6erspan_newlink() reach the NULL
> ip6gre_net first, through ip6gre_tunnel_find() or collect_md_tun, so
> "ip link add type ip6gre" by root in an ordinary container panics the
> node once ip6_gre is loaded:
> 
>   BUG: kernel NULL pointer dereference, address: 0000000000000320
>   RIP: 0010:ip6gre_tunnel_find+0x46/0xd0 [ip6_gre]
>    ip6gre_newlink+0x9b/0x120 [ip6_gre]
> 
> The check went into ip6gre_newlink_common(), which ran the tunnel lookup
> until upstream commit b80d0b93b991 ("net: ip6_gre: fix tunnel metadata
> device sharing.") moved the lookup into the newlink handlers. Move the
> check to the top of both handlers. They are the only callers of
> ip6gre_newlink_common() and serve as newlink for all three link types
> (ip6gre, ip6gretap and ip6erspan), and nothing else in the helper uses
> ip6gre_net.
> 
> Fixes: 46c13c45f25a ("net/gre: Consider VE_FEATURE_IPGRE on new net creation")
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-149645
> Feature: ve: per-CT features management
> Signed-off-by: Denis V. Lunev <den@openvz.org>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261104200755.1956316-1-den@openvz.org?part=1


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

      reply	other threads:[~2026-11-04 20:32 UTC|newest]

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

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=010701a1a8420875-d0f18d8f-85ba-4933-9e33-4ac36ccea483-000000@eu-central-1.amazonses.com \
    --to=no-reply@sashiko.virtuozzo.com \
    --cc=den@openvz.org \
    --cc=devel@openvz.org \
    --cc=khorenko@virtuozzo.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.