Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Aaron Avery <aavery77@hotmail.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: [PATCH] Fixed null pointer exception when user namespace is empty
Date: Sun, 17 Oct 2021 20:27:04 +0000	[thread overview]
Message-ID: <DM6PR01MB44446FF0D5FB0D11873C337ED7BB9@DM6PR01MB4444.prod.exchangelabs.com> (raw)
In-Reply-To: <CAHmME9p=qmQhJ5SQRhorjZJzVDpaX7BK1EA7douTwY856y9t1A@mail.gmail.com>

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-17 20:30 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 [this message]
2021-10-18  1:04     ` David Kerr

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=DM6PR01MB44446FF0D5FB0D11873C337ED7BB9@DM6PR01MB4444.prod.exchangelabs.com \
    --to=aavery77@hotmail.com \
    --cc=Jason@zx2c4.com \
    --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).