Re: [V9fs-developer] [PATCH] 9p: fix NULL pointer dereferences

From: sqweek
Date: Thu Jul 26 2018 - 10:48:54 EST


On 26 July 2018 at 17:48, Dominique Martinet <asmadeus@xxxxxxxxxxxxx> wrote:
Dmitry Vyukov wrote on Thu, Jul 26, 2018:
> > Let's refuse that at much higher level, like v9fs_mount() in
> > fs/9p/vfs_super.c
> >
> > I can't think of any valid reason for dev_name to be NULL, it's the
> > target IP or virtio handle.
>
> But I think trans=fd allows NULL addr today, no?

Ah, right, I read the patch too fast and read unix_create as fd_create,
I never realized there was a unix_create variant...

fd legitimately doesn't need a name, you are correct.

I'm really curious if anyone ever uses the unix/fd variants for "real"
stuff though!

I definitely used the unix variant for mounting plan9port servers (which all listen for 9p requests via unix sockets).

A long time ago I also experimented with mounting p9p servers from remote machines and I think I might have combined socat with -o trans=fd at one point. But I gave up on it in the end because having a process blocked in read() was preventing my laptop from going to sleep for the duration. And since I was trying to read /event type files the Tread could block for quite some time if no events were posted.

I believe 9pfuse had the same issue, so the problem be deeper than v9fs. But anyway I'm on quite a tangent already so I'll stop distracting you all from the work at hand. It's been nice to see 9p still kicking recently! :)
Â
(not meaning syzbot isn't real, but I have yet to see
anything take advantage of this, even if I could imagine some fun
applications by piping the wmii libixp server socket..

Wait woahhhhh, there's another wmii user left? I thought I was the last one!
-sqweek