From: Pavel Machek <pavel@denx.de>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
syzbot+5ca851459ed04c778d1d@syzkaller.appspotmail.com,
Ziyang Xuan <william.xuanziyang@huawei.com>,
Oliver Hartkopp <socketcan@hartkopp.net>
Subject: Re: [PATCH 4.14 2/2] can: bcm: fix UAF of bcm op
Date: Thu, 3 Feb 2022 21:45:18 +0100 [thread overview]
Message-ID: <20220203204518.GA18824@duo.ucw.cz> (raw)
In-Reply-To: <20220127180256.840826051@linuxfoundation.org>
[-- Attachment #1: Type: text/plain, Size: 1155 bytes --]
Hi!
> From: Ziyang Xuan <william.xuanziyang@huawei.com>
>
> Stopping tasklet and hrtimer rely on the active state of tasklet and
> hrtimer sequentially in bcm_remove_op(), the op object will be freed
> if they are all unactive. Assume the hrtimer timeout is short, the
> hrtimer cb has been excuted after tasklet conditional judgment which
> must be false after last round tasklet_kill() and before condition
> hrtimer_active(), it is false when execute to hrtimer_active(). Bug
> is triggerd, because the stopping action is end and the op object
> will be freed, but the tasklet is scheduled. The resources of the op
> object will occur UAF bug.
>
> Move hrtimer_cancel() behind tasklet_kill() and switch 'while () {...}'
> to 'do {...} while ()' to fix the op UAF problem.
I don't see this commit in mainline or next kernels. What is going on
here? Is it one of those "only needed in -stable" things? Or do we
still need to fix it in the mainline?
Best regards,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2022-02-03 20:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-27 18:08 [PATCH 4.14 0/2] 4.14.264-rc1 review Greg Kroah-Hartman
2022-01-27 18:08 ` [PATCH 4.14 1/2] drm/i915: Flush TLBs before releasing backing store Greg Kroah-Hartman
2022-01-27 18:08 ` [PATCH 4.14 2/2] can: bcm: fix UAF of bcm op Greg Kroah-Hartman
2022-02-03 20:45 ` Pavel Machek [this message]
2022-02-04 6:59 ` Greg Kroah-Hartman
2022-01-29 1:13 ` [PATCH 4.14 0/2] 4.14.264-rc1 review Guenter Roeck
2022-01-29 9:24 ` Naresh Kamboju
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=20220203204518.GA18824@duo.ucw.cz \
--to=pavel@denx.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=socketcan@hartkopp.net \
--cc=stable@vger.kernel.org \
--cc=syzbot+5ca851459ed04c778d1d@syzkaller.appspotmail.com \
--cc=william.xuanziyang@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®