From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from nov-007-i609.relay.mailchannels.net ([46.232.183.163]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ar7Ep-00043O-Qn for kexec@lists.infradead.org; Fri, 15 Apr 2016 17:09:19 +0000 MIME-Version: 1.0 Date: Fri, 15 Apr 2016 13:08:29 -0400 From: Emrah Demir Subject: Re: Removal of the kernel code/data/bss resources does break kexec/kdump In-Reply-To: References: <570F6D99.6090400@gmail.com> <2f4d7dee6bb0e4afdc05f2b7457fcf79@abdsec.com> <0cc6c4836fae00b175b4595446e1ed4f@abdsec.com> Message-ID: <3013ec906698cbc94d8ac1271dda0997@abdsec.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Linus Torvalds Cc: Kees Cook , Baoquan He , Freeman Zhang , linus971@gmail.com, Kexec Mailing List , Zhengyu Zhang , Kees Cook , Dave Young On 2016-04-15 12:48, Linus Torvalds wrote: > On Fri, Apr 15, 2016 at 8:46 AM, Emrah Demir wrote: >> >> file_ns_capable bring some problems. > > No it does not. file_ns_capable() is _required_ for security. We have > had several security issues with file IO doing "capable()", and it's > wrong and insecure. Of course file_ns_capable() is required, I didn't know you made some changes in include/linux/seq_file.h file >> I used capable and now there is no problem as far as I tested. > > You just screwed up the security, and with your change, a suid > application can be fooled into making the hidden data available to > non-secure users. > Sorry for screwing up the security. I would never wish to do that. As you said a suid application could screw up things. > "capable()" is wrong. For file reading, you *have* to use > file_ns_capable(). It really is that simple. You should not test the > capabilities of the process, you should be testing the capabilities of > the file descriptor, which comes from the *open-time* capabilities. > > It sounds like you applied just the patch to kernel/resource.c, > without applying the infrastructure patch. > > You also need commit 34dbbcdbf633 ("Make file credentials available to > the seqfile interfaces"). > Yeah, you are right. I didn't see that commit. It's okay now. Thank you! -Emrah _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec