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] [day] [month] [year] [list]
Message-ID: <CAByH8UuzrzJ4h1dbOKbAf8oCi-_PAcX_Z-aGp=+EDJnkBPvpOA@mail.gmail.com>
Date: Thu, 30 Oct 2025 10:01:28 -0700
From: Tim Hostetler <thostet@...gle.com>
To: Simon Horman <horms@...nel.org>
Cc: Joshua Washington <joshwash@...gle.com>, netdev@...r.kernel.org, 
	Richard Cochran <richardcochran@...il.com>
Subject: Re: [PATCH net 0/2] gve: Fix NULL dereferencing with PTP clock

On Thu, Oct 30, 2025 at 2:48 AM Simon Horman <horms@...nel.org> wrote:
>
> On Thu, Oct 30, 2025 at 09:43:57AM +0000, Simon Horman wrote:
> > On Wed, Oct 29, 2025 at 11:45:38AM -0700, Joshua Washington wrote:
> > > From: Tim Hostetler <thostet@...gle.com>
> > >
> > > This patch series fixes NULL dereferences that are possible with gve's
> > > PTP clock due to not stubbing certain ptp_clock_info callbacks.
> > >
> > > Tim Hostetler (2):
> > >   gve: Implement gettimex64 with -EOPNOTSUPP
> > >   gve: Implement settime64 with -EOPNOTSUPP
> > >
> > >  drivers/net/ethernet/google/gve/gve_ptp.c | 15 +++++++++++++++
> > >  1 file changed, 15 insertions(+)
> >
> > Hi Joshua and Tim,
> >
> > I think that the approach of enhancing the caller to only
> > call these callbacks if they are non NULL, as per the patch below,
> > seems more robust. It would fix all drivers in one go.
> >
> > - [PATCH] ptp: guard ptp_clock_gettime() if neither gettimex64 nor
> >   https://lore.kernel.org/all/20251028095143.396385-1-junjie.cao@intel.com/
>
> Oops, I see that I should have read to the end of that thread
> where Tim joins the discussion.
>
> It seems that this patchset is appropriate as it's expected
> that drivers expect an implementation of a variant of these callbacks.

Right, one of the gettime64 variants and settime64 are required
(whereas the other function callbacks aren't required from my
inspection). I actually have a patch I'll be sending out pretty soon
that will prevent the registration of a ptp_clock that doesn't
implement the required callbacks to prevent a bug like this from
happening again.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ