From: Zhihao Cheng <chengzhihao1@huawei.com>
To: <shao.mingyin@zte.com.cn>
Cc: <richard@nod.at>, <linux-mtd@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/5] ubifs: harden validation of on-disk inode and node metadata
Date: Tue, 3 Nov 2026 12:50:59 +0800 [thread overview]
Message-ID: <f9a31ba0-2a71-440a-6fe1-42641bdde01d@huawei.com> (raw)
In-Reply-To: <20261103123059667zqKLXZXpg5bc5F5FV7Xy8@zte.com.cn>
在 2026/11/3 12:30, shao.mingyin@zte.com.cn 写道:
>> From my perspective, I'm not really interested in the problem scenarios
>> triggered by malicious fs image, let Richard decide whether to merge it.
>> This series does not seem to introduce any issues, there are two small
>> nits in patch 2&3.
>
> Thanks for the review. The threat model in the cover is the only one the
> series claims: mounting such an image needs CAP_SYS_ADMIN in the mounting
> namespace or access to the flash.
>
> Two of the five are not strictly "malicious image only", in case that is
> useful for Richard's call:
>
> - 4/5 is replay: a node that was corrupted on flash or written wrong would
> otherwise let ubifs_recover_size() extend an inode to a bogus size.
> - 5/5 leaves the image unmountable after a single removexattr(): the
> underflowed counters are written back to flash, so it survives remount.
>
> The other three are mount-time validation of fields that validate_inode()
> and validate_master() already range-check for other values, so they change
> nothing for a valid image. The patches are independent and any subset
> applies, so dropping some is fine -- I will leave the decision to Richard.
>
> Both nits are taken: patch 2 folds the size check into the existing
> ui->xattr block, patch 3 merges the lower bound into the highest_inum
> check (that one then reports error 3 for both bounds).
>
> For the series: I will repost only those two as [PATCH v2] in a new
> thread, each noting that it supersedes 2/5 or 3/5 of the v1 series. 1/5,
> 4/5 and 5/5 are untouched, so I would rather not resend them -- say the
> word if you would prefer the whole series as v2.
Resend v2 series please.
>
> Thanks,
> Shao
> .
>
prev parent reply other threads:[~2026-11-03 4:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 13:45 shao.mingyin
2026-11-02 13:45 ` [PATCH 1/5] ubifs: reject inodes with an out-of-range size shao.mingyin
2026-11-02 13:49 ` [PATCH 2/5] ubifs: reject xattr inodes whose size does not match the value shao.mingyin
2026-11-03 2:06 ` Zhihao Cheng
2026-11-03 4:31 ` shao.mingyin
2026-11-02 13:49 ` [PATCH 3/5] ubifs: reject master nodes claiming a too small inode number shao.mingyin
2026-11-03 2:06 ` Zhihao Cheng
2026-11-03 4:31 ` shao.mingyin
2026-11-03 4:50 ` Zhihao Cheng
2026-11-02 13:49 ` [PATCH 4/5] ubifs: validate inode and data node sizes during replay shao.mingyin
2026-11-02 13:49 ` [PATCH 5/5] ubifs: xattr: guard against xattr accounting underflow shao.mingyin
2026-11-03 2:06 ` [PATCH 0/5] ubifs: harden validation of on-disk inode and node metadata Zhihao Cheng
2026-11-03 4:30 ` shao.mingyin
2026-11-03 4:50 ` Zhihao Cheng [this message]
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=f9a31ba0-2a71-440a-6fe1-42641bdde01d@huawei.com \
--to=chengzhihao1@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
--cc=shao.mingyin@zte.com.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
all inboxes | Powered by JetHome®