[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180228093238.GA3769@pd.tnic>
Date: Wed, 28 Feb 2018 10:32:39 +0100
From: Borislav Petkov <bp@...en8.de>
To: Seunghun Han <kkamagui@...il.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Tony Luck <tony.luck@...el.com>, linux-edac@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86: mce: fix kernel panic when check_interval is changed
On Mon, Feb 26, 2018 at 05:05:04AM +0900, Seunghun Han wrote:
> >> It is a critical security problem because the attacker can make kernel panic
> >> by writing a value to the check_interval file in userspace, and it can be
> >> used for Denial-of-Service (DoS) attack.
> >
> > As only root can write to that file, it's not that critical of an issue,
> > but yes, this is a problem. Nice find and fix.
This is still the wrong fix. You need to:
1. check the old value of check_interval in store_int_with_restart() and
exit early if it is the same.
2. have mce_restart() grab a newly defined mutex, say, mce_sysfs_mutex
or so, which synchronizes all CPUs so that their timers get deleted and
reinitialized in the proper order.
Thx.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
Powered by blists - more mailing lists