linux-hardening.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Enrico Weigelt, metux IT consult" <lkml@metux.net>
To: Wang Zi-cheng <wzc@smail.nju.edu.cn>,
	keescook@chromium.org, tycho@tycho.pizza,
	linux-hardening@vger.kernel.org
Subject: Re: [PATCH] RFC v2 struct const ops pointers member hardening
Date: Fri, 30 Jul 2021 12:18:52 +0200	[thread overview]
Message-ID: <26f5c90b-2e5d-5c95-efd2-aa9149acbf26@metux.net> (raw)
In-Reply-To: <20210728065239.472464-1-wzc@smail.nju.edu.cn>

On 28.07.21 08:52, Wang Zi-cheng wrote:

Hi,

> 1. this is a useful hardening, my opinion was wrong in the previous patch,
> because the attacker may overwrite a struct with an "struct file*" pointer,
>   which point to a manufactured file struct with malicious f_op.
> Hardening operation pointers CAN help.
>> On the other side, kernel uses `kmem_cache_create` to alloc file/inode rather than `kmalloc`,
>> which makes it hard to exploit through heap overflow or UAF, so maybe this is not a "must" update.

note that there can be situations where a file_operations struct is
actually created at runtime. quite rare, but still possible.


--mtx

-- 
---
Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert
werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren
GPG/PGP-Schlüssel zu.
---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287

  reply	other threads:[~2021-07-30 10:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-28  6:52 [PATCH] RFC v2 struct const ops pointers member hardening Wang Zi-cheng
2021-07-30 10:18 ` Enrico Weigelt, metux IT consult [this message]
2021-07-31 20:50 ` Kees Cook

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=26f5c90b-2e5d-5c95-efd2-aa9149acbf26@metux.net \
    --to=lkml@metux.net \
    --cc=keescook@chromium.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=tycho@tycho.pizza \
    --cc=wzc@smail.nju.edu.cn \
    /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;
as well as URLs for NNTP newsgroup(s).