All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: vdronov@redhat.com
Cc: antti.laakso@intel.com, netdev@vger.kernel.org,
	richardcochran@gmail.com, sjohnsto@redhat.com,
	vlovejoy@redhat.com, linux-kernel@vger.kernel.org,
	artem.bityutskiy@intel.com
Subject: Re: [PATCH] ptp: free ptp device pin descriptors properly
Date: Tue, 14 Jan 2020 10:59:57 -0800 (PST)	[thread overview]
Message-ID: <20200114.105957.1581554720765705127.davem@davemloft.net> (raw)
In-Reply-To: <20200113130009.2938-1-vdronov@redhat.com>

From: Vladis Dronov <vdronov@redhat.com>
Date: Mon, 13 Jan 2020 14:00:09 +0100

> There is a bug in ptp_clock_unregister(), where ptp_cleanup_pin_groups()
> first frees ptp->pin_{,dev_}attr, but then posix_clock_unregister() needs
> them to destroy a related sysfs device.
> 
> These functions can not be just swapped, as posix_clock_unregister() frees
> ptp which is needed in the ptp_cleanup_pin_groups(). Fix this by calling
> ptp_cleanup_pin_groups() in ptp_clock_release(), right before ptp is freed.
> 
> This makes this patch fix an UAF bug in a patch which fixes an UAF bug.
> 
> Reported-by: Antti Laakso <antti.laakso@intel.com>
> Fixes: a33121e5487b ("ptp: fix the race between the release of ptp_clock and cdev")
> Link: https://lore.kernel.org/netdev/3d2bd09735dbdaf003585ca376b7c1e5b69a19bd.camel@intel.com/
> Signed-off-by: Vladis Dronov <vdronov@redhat.com>

Applied, thank you.

      parent reply	other threads:[~2020-01-14 19:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-08 15:38 NULL pointer dereference bug when unbinding 'igb' -driver from Intel i210 ethernet card Antti Laakso
2020-01-13 13:00 ` [PATCH] ptp: free ptp device pin descriptors properly Vladis Dronov
2020-01-14  4:26   ` Richard Cochran
2020-01-14 18:59   ` David Miller [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=20200114.105957.1581554720765705127.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=antti.laakso@intel.com \
    --cc=artem.bityutskiy@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=sjohnsto@redhat.com \
    --cc=vdronov@redhat.com \
    --cc=vlovejoy@redhat.com \
    /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.