All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: Vladis Dronov <vdronov@redhat.com>
Cc: Antti Laakso <antti.laakso@intel.com>,
	netdev@vger.kernel.org, sjohnsto@redhat.com, vlovejoy@redhat.com,
	linux-kernel@vger.kernel.org, davem@davemloft.net,
	artem.bityutskiy@intel.com
Subject: Re: [PATCH] ptp: free ptp device pin descriptors properly
Date: Mon, 13 Jan 2020 20:26:16 -0800	[thread overview]
Message-ID: <20200114042616.GA1459@localhost> (raw)
In-Reply-To: <20200113130009.2938-1-vdronov@redhat.com>

On Mon, Jan 13, 2020 at 02:00:09PM +0100, Vladis Dronov wrote:
> 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>

Acked-by: Richard Cochran <richardcochran@gmail.com>

  reply	other threads:[~2020-01-14  4:26 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 [this message]
2020-01-14 18:59   ` David Miller

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=20200114042616.GA1459@localhost \
    --to=richardcochran@gmail.com \
    --cc=antti.laakso@intel.com \
    --cc=artem.bityutskiy@intel.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --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.