Development discussion of WireGuard
 help / color / mirror / Atom feed
From: David Kerr <david@kerr.net>
To: wireguard@lists.zx2c4.com
Subject: Re: [PATCH] Fixed null pointer exception when user namespace is empty
Date: Sun, 17 Oct 2021 21:04:48 -0400	[thread overview]
Message-ID: <CAJJxGdFsd+xr4rVBg79kQdx2Zqx1owfkQwbeuxkJ7khCVjyv2w@mail.gmail.com> (raw)
In-Reply-To: <DM6PR01MB44446FF0D5FB0D11873C337ED7BB9@DM6PR01MB4444.prod.exchangelabs.com>

My QNAP system just recently did a system update to QTS version 5
which now includes Wireguard as part of their QVPN service.  I have
not tried it, but it is there along with the usual suspects of
OpenVPN, IPSec, PPTP, etc.

DAK.


On Sun, Oct 17, 2021 at 4:30 PM Aaron Avery <aavery77@hotmail.com> wrote:
>
> Thank you, Jason. Sorry I missed the Signed-off-by. As I said, I'm not that familiar with Linux development.
> I'm quite sure I have the correct .config for my QNAP's kernel, and the WG kernel module I built works perfectly, with this patch. All of the *_NS entries in their config file are enabled.
>
> After more research, I agree with you completely that this could easily be a QNAP-specific bug so shouldn't be merged. As a NAS, they probably have some custom network driver code and may have failed to initialize user_ns in this situation. The only somewhat-relevant kernel commit I could find for rtnetlink.c is https://github.com/torvalds/linux/commit/f428fe4a04cc339166c8bbd489789760de3a0cee and version 4.14.24 is more recent than that.
>
> A lot of people like me use a QNAP NAS as their always-on "home server". Hopefully Google will crawl this message list so that tech-savvy people searching for Wireguard QNAP will find this patch and have a chance to use WG to remotely access their home network.
>
> - Aaron
>
> From: Jason A. Donenfeld <Jason@zx2c4.com>
> Sent: Saturday, October 16, 2021 7:52 PM
> To: Aaron Avery <aavery77@hotmail.com>
> Cc: WireGuard mailing list <wireguard@lists.zx2c4.com>
> Subject: Re: [PATCH] Fixed null pointer exception when user namespace is empty
>
> Hi Aaron,
>
> That patch is missing your Signed-off-by line, so I won't be able to
> take it as-is.
>
> However, I also wonder if it makes sense. I just grepped the entire
> kernel and I couldn't find any other instances of net->user_ns being
> NULL checked. Is it possible that there's a bug in QNAP's kernel
> somewhere? Or you're compiling against the wrong .config so the struct
> offsets are wrong? Or something else? When should net->user_ns be
> NULL?
>
> Thanks,
> Jason

      reply	other threads:[~2021-10-18  1:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-16 20:59 Aaron Avery
2021-10-17  0:52 ` Jason A. Donenfeld
2021-10-17 20:27   ` Aaron Avery
2021-10-18  1:04     ` David Kerr [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=CAJJxGdFsd+xr4rVBg79kQdx2Zqx1owfkQwbeuxkJ7khCVjyv2w@mail.gmail.com \
    --to=david@kerr.net \
    --cc=wireguard@lists.zx2c4.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).