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] [thread-next>] [day] [month] [year] [list]
Message-ID: <980e87b7-64f8-4980-83b0-e386d48af310@linux.ibm.com>
Date: Wed, 17 Sep 2025 12:22:12 +0530
From: Mahanta Jambigi <mjambigi@...ux.ibm.com>
To: Kuniyuki Iwashima <kuniyu@...gle.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>
Cc: Simon Horman <horms@...nel.org>, Kuniyuki Iwashima <kuni1840@...il.com>,
        netdev@...r.kernel.org,
        syzbot+ea28e9d85be2f327b6c6@...kaller.appspotmail.com,
        "D. Wythe" <alibuda@...ux.alibaba.com>,
        Dust Li <dust.li@...ux.alibaba.com>,
        Sidraya Jayagond <sidraya@...ux.ibm.com>,
        Wenjia Zhang
 <wenjia@...ux.ibm.com>,
        Tony Lu <tonylu@...ux.alibaba.com>, Wen Gu <guwen@...ux.alibaba.com>,
        Ursula Braun <ubraun@...ux.ibm.com>,
        Hans Wippel <hwippel@...ux.ibm.com>
Subject: Re: [PATCH v2 net-next 1/7] smc: Fix use-after-free in
 __pnet_find_base_ndev().

On 17/09/25 3:17 am, Kuniyuki Iwashima wrote:
> +	dst = __sk_dst_get(sk);
> +	dev = dst ? dst_dev_rcu(dst) : NULL;
> +	dev_hold(dev);

We should hold the reference to dev only if it's non-NULL(although
netdev_hold() has this sanity check), as we are doing the same while
releasing the reference to dev in below code:

if(dev) {
    smc_pnet_find_roce_by_pnetid(dev, ini);
    dev_put(dev);
}

Same applies to changes in smc_pnet_find_ism_resource().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ