Received: by 10.223.185.116 with SMTP id b49csp5982972wrg; Wed, 28 Feb 2018 01:51:59 -0800 (PST) X-Google-Smtp-Source: AH8x227TwHBPW8d6h6xTeL3+aRjn5KWFb2DX+dbBAWr9cygGvyFF/J1qIx5R3FLgvRvlD//mSxVI X-Received: by 2002:a17:902:149:: with SMTP id 67-v6mr17222843plb.73.1519811519773; Wed, 28 Feb 2018 01:51:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519811519; cv=none; d=google.com; s=arc-20160816; b=F09dNSGMUeXz1ZqK6Q81W2/sDBwcbE6GTdUH7xm+HCGv6a8teRWmBp3Prp8Msb1HKl f6Tl4xwvlDt1qJ20oYr36izq/zFP5+tZSOaC++lDcb66ewk0JqEYeJ4Z6Gh0xj7lQ5CI ZKICcpEXecbXit0Ji6jEIbqwKSvpu39U4WRp5vhZgwTVNyeQiK0nONx6+haOvyLt/abR n7C4/PzhtJzKWmlcdQp4FwncTBHXBGpdNIk3ZheRIR6wTmrRSLbnW3shvo/fFMU5LCRa sE+V7/2p55Joc8aH3Z2iQ38altNHwIN74fY/vil8RSVZhkyiNySYI1w9z9CPh3BEIldq NRyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=O/CmAOqFlD2mZpT5KYuKYAOozTIwr43WLUrNUQW5yVY=; b=z8h9zXrOIFwEFzVWCnFkWkMXRESwN4ybK8FU2pz43zNUAUk6QQn4/Gqsdrwqm7EMjt MN+zj3hrDRQ8p8YTs3b2Mq92ntybyAv83x5h3eOI9YILsY+CK0hc/ZxOSAD9k5NIb4sI h5evG2ado5td2bqoiQZX+t9+RGBZ7NeCVSg0tYuWXhR+WWtE4o6F3+2LJ0/L8twvWLsj k9hXpuIwnnIYWBw0MJIOF768WNWl4YXEf/JZPfefmI/WsamRYcbWWH4c2LyUgvTmaM+2 RTFrn3UtrilgcsbpsXAtQpoqu+Wkd5Qj3++dPxhoCSlQxocHiiUj6djlBS3Y4FtNSbjW 5XYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gkOJtJ3E; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k23-v6si1056909pls.42.2018.02.28.01.51.43; Wed, 28 Feb 2018 01:51:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gkOJtJ3E; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752508AbeB1Jst (ORCPT + 99 others); Wed, 28 Feb 2018 04:48:49 -0500 Received: from mail-yb0-f179.google.com ([209.85.213.179]:37762 "EHLO mail-yb0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752494AbeB1Jsr (ORCPT ); Wed, 28 Feb 2018 04:48:47 -0500 Received: by mail-yb0-f179.google.com with SMTP id u5-v6so620204ybf.4; Wed, 28 Feb 2018 01:48:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=O/CmAOqFlD2mZpT5KYuKYAOozTIwr43WLUrNUQW5yVY=; b=gkOJtJ3EGhgSnUf4ksPMpDFeePQWB+idIpbDCHWuBhl41VFGvYDAtA412xBgdZlg43 SWxbnZvvXOPG0FpJOjECA28DR3VAsHDW1cZwNihgug2idnRhXyAXd+R0pY8tAWNyXkh9 AM/5QWnk/J/K9AFRz9AcLTDJfKKJzX52tRCBm2ag6Ip9YK0xO5eJYZFtpOCPjWQPlZxJ oABWEegVEYmxlKpQhZiKkYqJvqs2K8gxmppgDI5PlBmEoyOwY5LiqJ/Vbh9IdrrnsF5c I/6kpqJOKIn0KJrk7u12ub6BW6sBnDA4NdsJ4eLM1Obg9o2cgpHxBSntQFrwHvYfB0rv u3Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=O/CmAOqFlD2mZpT5KYuKYAOozTIwr43WLUrNUQW5yVY=; b=ikV3Q/2qr1nwKLIAS8rUVjtb7j+z04GTXXaxFXYbqyap4WH1MTeix4UVlAbuIdwk0d ISutRjR1UnKk33LAJp08YHBMeAXHizlL1MF9u6BQ58zoVRW3ME0Zmo5BewKaXFss6W94 noyq95aEM+q0t5BWoihkV9v/Z+9EM7pUpFhBGYvyfI+aR7a37cmyCQrjLjZsMCMlxmDf novGuTYEFAjXbUx8AEoybepYXyaIn0vZVArnz5LH+zvhbK21ss4sJUGpewxJuv7Z22I5 IRzNb1OXxueQLWdi+i9fLf/2NZai/KP8u/cOLkesk6JY6DZj6nszZ2+92c3kh3S8RQ3N 2jzQ== X-Gm-Message-State: APf1xPB1Z9qQ7me7r0i7KA494RXRVh8v7OudJ8nfHfF2esuVa7FbjfBk 9pJnqFIbVJA0pUcBnC9cNY3j9RYzWf1vMGUnv+k= X-Received: by 2002:a25:ae44:: with SMTP id g4-v6mr11309483ybe.309.1519811326256; Wed, 28 Feb 2018 01:48:46 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a25:b98d:0:0:0:0:0 with HTTP; Wed, 28 Feb 2018 01:48:45 -0800 (PST) In-Reply-To: <20180228093238.GA3769@pd.tnic> References: <20180223101350.8344-1-kkamagui@gmail.com> <20180223105220.GA12058@kroah.com> <20180228093238.GA3769@pd.tnic> From: Seunghun Han Date: Wed, 28 Feb 2018 18:48:45 +0900 Message-ID: Subject: Re: [PATCH] x86: mce: fix kernel panic when check_interval is changed To: Borislav Petkov Cc: Greg Kroah-Hartman , Tony Luck , linux-edac@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Borislav. 2018-02-28 18:32 GMT+09:00 Borislav Petkov : > 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. Thank you for your advice. I will change my patch like that and send it again. Best regard. Seunghun. > > Thx. > > -- > Regards/Gruss, > Boris. > > Good mailing practices for 400: avoid top-posting and trim the reply.