lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 3 Sep 2020 20:57:01 +0900
From:   Tetsuo Handa <>
To:     Wouter Verhelst <>
Cc:     syzbot <>,
        Jon Maloy <>,
        Ying Xue <>,,
        "David S. Miller" <>,
        Jakub Kicinski <>,,
Subject: Re: [PATCH] tipc: fix shutdown() of connectionless socket

On 2020/09/03 20:31, Wouter Verhelst wrote:
> 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.

Excuse me, but other datagram sockets (e.g. socket(PF_INET, SOCK_DGRAM, 0)) does not
hit this problem. What do you want to do? Add a "whether the file descriptor passed
to ioctl(NBD_SET_SOCK) is a SOCK_STREAM socket" test to the NBD side?

I think that regardless of whether NBD expects only SOCK_STREAM sockets,
tipc_wait_for_rcvmsg() on a SOCK_DGRAM socket can't return is a bug.
David Miller already applied this patch and queued up for -stable.
Do we need to revert this patch?

Powered by blists - more mailing lists