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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 11 Jul 2022 15:21:21 +0800
From:   Wen Gu <guwen@...ux.alibaba.com>
To:     Hawkins Jiawei <yin31149@...il.com>,
        syzbot+5f26f85569bd179c18ce@...kaller.appspotmail.com
Cc:     andrii@...nel.org, ast@...nel.org, borisp@...dia.com,
        bpf@...r.kernel.org, daniel@...earbox.net, davem@...emloft.net,
        edumazet@...gle.com, yoshfuji@...ux-ipv6.org, dsahern@...nel.org,
        john.fastabend@...il.com, kafai@...com, kgraul@...ux.ibm.com,
        kpsingh@...nel.org, kuba@...nel.org, linux-kernel@...r.kernel.org,
        netdev@...r.kernel.org, pabeni@...hat.com, songliubraving@...com,
        syzkaller-bugs@...glegroups.com, yhs@...com,
        skhan@...uxfoundation.org, 18801353760@....com,
        paskripkin@...il.com,
        linux-kernel-mentees@...ts.linuxfoundation.org
Subject: Re: [PATCH] smc: fix refcount bug in sk_psock_get (2)



On 2022/7/9 10:46 am, Hawkins Jiawei wrote:

> 
> syzbot is try to setup TLS on a SMC socket.
> 
> During SMC fallback process in connect syscall, kernel will sets the
> smc->sk.sk_socket->file->private_data to smc->clcsock
> in smc_switch_to_fallback(), and set smc->clcsock->sk_user_data
> to origin smc in smc_fback_replace_callbacks().

> 
> Later, sk_psock_get() will treat the smc->clcsock->sk_user_data
> as sk_psock type, which triggers the refcnt warning.
> 


Thanks for your analysis.

Although syzbot found this issue in SMC, seems that it is a generic
issue about sk_user_data usage? Fixing it from SK_USER_DATA_PTRMASK
as you plan should be a right way.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ