Re: [PATCH net] can: bcm: switch timer to HRTIMER_MODE_SOFT and remove hrtimer_tasklet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 10, 2022 at 09:23:22PM +0800, Ziyang Xuan wrote:
> From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> 
> [ commit bf74aa86e111aa3b2fbb25db37e3a3fab71b5b68 upstream ]
> 
> Stop tx/rx cycle 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.

That is not the changelog text of this commit.  Why modify it?

> 
> ----------------------------------------------------------------------
> 
> This patch switches the timer to HRTIMER_MODE_SOFT, which executed the
> timer callback in softirq context and removes the hrtimer_tasklet.
> 
> Reported-by: syzbot+652023d5376450cc8516@xxxxxxxxxxxxxxxxxxxxxxxxx
> Cc: stable@xxxxxxxxxxxxxxx # 4.19
> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Signed-off-by: Anna-Maria Gleixner <anna-maria@xxxxxxxxxxxxx>
> Acked-by: Oliver Hartkopp <socketcan@xxxxxxxxxxxx>
> Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
> Signed-off-by: Ziyang Xuan <william.xuanziyang@xxxxxxxxxx>
> ---
>  net/can/bcm.c | 156 +++++++++++++++++---------------------------------
>  1 file changed, 52 insertions(+), 104 deletions(-)

What stable kernel tree(s) are you wanting this backported to?

thanks,

greg k-h



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux