linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Wagner <mark@lanfear.net>
To: linux-nfs@vger.kernel.org
Subject: Bug report: rpc.mountd segv due to commit 8f459a072f93458fc2198ce1962b279164aa9059 Remove abuse of ai_canonname
Date: Mon, 13 May 2019 15:24:06 -0700	[thread overview]
Message-ID: <CALUOdrwv6RHwFCbPBmsZfY0o_18cP_o-y7Sj_O4OfEKK1MxEfw@mail.gmail.com> (raw)

(gdb) run -F
Starting program: /usr/sbin/rpc.mountd -F
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
rpc.mountd: Version 2.3.4 starting

Program received signal SIGSEGV, Segmentation fault.
0x0000555555564921 in DoMatch (text=0x0, p=0x5555555af100
"knode*.lanfear.net") at wildmat.c:75
75      wildmat.c: No such file or directory.
(gdb) bt
#0  0x0000555555564921 in DoMatch (text=0x0, p=0x5555555af100
"knode*.lanfear.net") at wildmat.c:75
#1  0x0000555555564b69 in wildmat (text=text@entry=0x0,
p=p@entry=0x5555555af100 "knode*.lanfear.net") at wildmat.c:140
#2  0x000055555555e9ab in check_wildcard (clp=<optimized out>,
ai=<optimized out>) at client.c:616
#3  client_check (ai=<optimized out>, clp=<optimized out>) at client.c:740
#4  client_check (clp=<optimized out>, ai=<optimized out>) at client.c:732
#5  0x000055555555edb4 in client_compose (ai=ai@entry=0x5555555ac830)
at client.c:417
#6  0x000055555555c0f3 in auth_unix_ip (f=3) at cache.c:115
#7  0x000055555555d95a in cache_process_req
(readfds=readfds@entry=0x7fffffffdc90) at cache.c:1417
#8  0x000055555555de28 in my_svc_run () at svc_run.c:118
#9  0x000055555555941a in main (argc=<optimized out>, argv=<optimized
out>) at mountd.c:892

The commit message says "There is only one caller to
host_reliable_addrinfo() that actually uses the string in
ai->ai_canonname, and then only for debugging messages. Change those
to display the IP address instead."

That is not quite right. ./support/export/client.c check_wildcard()
uses ai_canonname:

static int
check_wildcard(const nfs_client *clp, const struct addrinfo *ai)
{
        char *cname = clp->m_hostname;
        char *hname = ai->ai_canonname;
...

Kernel versions:
server: 5.0.10-gentoo
client: 5.0.10-200.fc29.x86_64

nfs-utils version: 2.3.4

"Are you using any of the security options?" No.

exportfs -v
/usr/local/k8s
knode*.lanfear.net(sync,wdelay,hide,no_subtree_check,sec=sys,rw,secure,no_root_squash,no_all_squash)

-- 
Mark Wagner <mark@lanfear.net>

             reply	other threads:[~2019-05-13 22:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-13 22:24 Mark Wagner [this message]
2019-05-14 11:51 ` Bug report: rpc.mountd segv due to commit 8f459a072f93458fc2198ce1962b279164aa9059 Remove abuse of ai_canonname Chuck Lever

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=CALUOdrwv6RHwFCbPBmsZfY0o_18cP_o-y7Sj_O4OfEKK1MxEfw@mail.gmail.com \
    --to=mark@lanfear.net \
    --cc=linux-nfs@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).