lists.openwall.net   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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACT4Y+ZAQQW9kKWjq8HT-o878-Z=49n+JLEk+VnBSyR2E-+QFA@mail.gmail.com>
Date:   Tue, 13 Feb 2018 20:16:41 +0100
From:   Dmitry Vyukov <dvyukov@...gle.com>
To:     Al Viro <viro@...iv.linux.org.uk>
Cc:     Christoph Hellwig <hch@...radead.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Cong Wang <xiyou.wangcong@...il.com>,
        syzbot 
        <bot+9abea25706ae35022385a41f61e579ed66e88a3f@...kaller.appspotmail.com>,
        David Miller <davem@...emloft.net>,
        LKML <linux-kernel@...r.kernel.org>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>,
        syzkaller-bugs@...glegroups.com,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: KASAN: use-after-free Read in sock_release

On Thu, Nov 30, 2017 at 4:46 PM, Al Viro <viro@...iv.linux.org.uk> wrote:
> On Thu, Nov 30, 2017 at 05:18:33AM -0800, Christoph Hellwig wrote:
>> On Thu, Nov 30, 2017 at 02:07:19AM +0000, Al Viro wrote:
>> > Incidentally, grepping for sys_close() shows another piece of fun in
>> > net/netfilter/xt_bpf.c.  Folks, ONCE DESCRIPTOR IS INSTALLED, THAT'S
>> > IT; THERE'S NO REMOVING IT ON FAILURE EXITS.  sys_close() should
>> > never, ever be used that way.  Sigh...
>>
>> Would be great do unexport the thing.  Except that we also have
>> binfmt_misc (which looks legit) and autofs4, which on crack decided
>> that close() isn't a fun syscall, they'd much rather have an ioctl
>> that does exactly the same..
>
> Yes, since binfmt_misc one is guaranteed that its descriptor table is
> not shared - all callchains go through do_execveat_common(), where we'd
> use unshare_files().  autofs one is... not in good taste, but still
> safe; there the descriptor is preexisting and it's essentially a weird
> way of spelling close(2).  References from syscall tables are, of course,
> OK.  init/*.c uses are done pretty much from userland - they could have
> been straight syscalls, if not for the lack of klibc in kernel tree.
> Everything else, though...
>
> IMO we need a whack-a-mole list somewhere; "new callers of sys_close()
> anywhere outside of init/* and syscall tables" definitely should be
> on it...


#syz fix: fix kcm_clone()

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ