Thread (8 messages) flat view 8 messages, 3 authors, 2020-09-03

Re: [PATCH] tipc: fix shutdown() of connectionless socket

From: Wouter Verhelst <hidden>
Date: 2020-09-03 12:04:43

So.

On Wed, Sep 02, 2020 at 08:09:54PM +0900, Tetsuo Handa wrote:
syzbot is reporting hung task at nbd_ioctl() [1], for there are two
problems regarding TIPC's connectionless socket's shutdown() operation.
I found C reproducer for this problem (shown below) from "no output from
test machine (2)" report.

----------

int main(int argc, char *argv[])
{
        const int fd = open("/dev/nbd0", 3);
        ioctl(fd, NBD_SET_SOCK, socket(PF_TIPC, SOCK_DGRAM, 0));
NBD expects a stream socket, not a datagram one.
        ioctl(fd, NBD_DO_IT, 0);
This is supposed to sit and wait until someone disconnects the device
again (which you probably cna't do with datagram sockets). Changing that
changes a userspace API.

-- 
To the thief who stole my anti-depressants: I hope you're happy

  -- seen somewhere on the Internet on a photo of a billboard
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help