From: Jakub Kicinski <kuba@kernel.org>
To: Chad Aldreda <ca@modelmiser.com>
Cc: Richard Cochran <richardcochran@gmail.com>,
David Woodhouse <dwmw2@infradead.org>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Shuangpeng Bai <shuangpeng.kernel@gmail.com>,
netdev@vger.kernel.org, stable@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2] ptp: vmclock: keep the device state until the last file is closed
Date: Wed, 18 Nov 2026 18:16:48 -0800 [thread overview]
Message-ID: <20261118181648.0ed9a202@kernel.org> (raw)
In-Reply-To: <20261112161514.1647680-2-ca@modelmiser.com>
On Thu, 12 Nov 2026 16:15:27 +0000 Chad Aldreda wrote:
> vmclock_probe() allocates struct vmclock_state with devm_kzalloc() and
> maps the shared page with devm_memremap(), so both are released when
> the driver is unbound, but an open /dev/vmclockN keeps using them
> through its file state. After an unbind, read() runs on the freed
> struct and reads through the released mapping, and a poll() in
> progress sleeps on a wait queue in the freed struct. KASAN reports a
> slab-use-after-free in vmclock_miscdev_read(). In testing, the same
> read() faulted on the unmapped page once the device had been bound
> again.
this patch needs a rebase after recent mass rename of kmalloc
--
pw-bot: cr
prev parent reply other threads:[~2026-11-19 2:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 16:15 [PATCH net v2] ptp: vmclock: keep the device state until the last file is closed Chad Aldreda
2026-11-19 2:16 ` Jakub Kicinski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261118181648.0ed9a202@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=ca@modelmiser.com \
--cc=davem@davemloft.net \
--cc=dwmw2@infradead.org \
--cc=edumazet@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=shuangpeng.kernel@gmail.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.