From: Emrah Demir <ed@abdsec.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Kees Cook <keescook@chromium.org>, Baoquan He <bhe@redhat.com>,
Freeman Zhang <freeman.zhang1992@gmail.com>,
linus971@gmail.com,
Kexec Mailing List <kexec@lists.infradead.org>,
Zhengyu Zhang <zhezhang@redhat.com>,
Kees Cook <keescook@google.com>, Dave Young <dyoung@redhat.com>
Subject: Re: Removal of the kernel code/data/bss resources does break kexec/kdump
Date: Fri, 15 Apr 2016 13:08:29 -0400 [thread overview]
Message-ID: <3013ec906698cbc94d8ac1271dda0997@abdsec.com> (raw)
In-Reply-To: <CA+55aFywMZ+X2o7LRt3KVNO9+gJt2yBmdyWR8M-k8WHhjJbf9w@mail.gmail.com>
On 2016-04-15 12:48, Linus Torvalds wrote:
> On Fri, Apr 15, 2016 at 8:46 AM, Emrah Demir <ed@abdsec.com> 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
next prev parent reply other threads:[~2016-04-15 17:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-14 10:14 Removal of the kernel code/data/bss resources does break kexec/kdump Freeman Zhang
2016-04-14 11:07 ` Emrah Demir
2016-04-14 17:40 ` Linus Torvalds
2016-04-14 20:27 ` Emrah Demir
2016-04-15 1:02 ` Linus Torvalds
2016-04-15 4:41 ` Kees Cook
2016-04-15 15:46 ` Emrah Demir
2016-04-15 16:48 ` Linus Torvalds
2016-04-15 17:08 ` Emrah Demir [this message]
2016-04-19 9:04 ` Dave Young
2016-04-19 16:20 ` Linus Torvalds
2016-04-20 1:13 ` Dave Young
2016-04-14 11:26 ` Baoquan He
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=3013ec906698cbc94d8ac1271dda0997@abdsec.com \
--to=ed@abdsec.com \
--cc=bhe@redhat.com \
--cc=dyoung@redhat.com \
--cc=freeman.zhang1992@gmail.com \
--cc=keescook@chromium.org \
--cc=keescook@google.com \
--cc=kexec@lists.infradead.org \
--cc=linus971@gmail.com \
--cc=torvalds@linux-foundation.org \
--cc=zhezhang@redhat.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