From: Sasha Levin <sashal@kernel.org>
To: gregkh@linuxfoundation.org
Cc: ebiggers@google.com, stable@vger.kernel.org
Subject: Re: FAILED: patch "[PATCH] ubifs: don't trigger assertion on invalid no-key filename" failed to apply to 4.14-stable tree
Date: Thu, 6 Feb 2020 20:13:41 -0500 [thread overview]
Message-ID: <20200207011341.GR31482@sasha-vm> (raw)
In-Reply-To: <158101646257220@kroah.com>
On Thu, Feb 06, 2020 at 08:14:22PM +0100, gregkh@linuxfoundation.org wrote:
>
>The patch below does not apply to the 4.14-stable tree.
>If someone wants it applied there, or to any other stable or longterm
>tree, then please email the backport, including the original git commit
>id to <stable@vger.kernel.org>.
>
>thanks,
>
>greg k-h
>
>------------------ original commit in Linus's tree ------------------
>
>From f0d07a98a070bb5e443df19c3aa55693cbca9341 Mon Sep 17 00:00:00 2001
>From: Eric Biggers <ebiggers@google.com>
>Date: Mon, 20 Jan 2020 14:31:59 -0800
>Subject: [PATCH] ubifs: don't trigger assertion on invalid no-key filename
>
>If userspace provides an invalid fscrypt no-key filename which encodes a
>hash value with any of the UBIFS node type bits set (i.e. the high 3
>bits), gracefully report ENOENT rather than triggering ubifs_assert().
>
>Test case with kvm-xfstests shell:
>
> . fs/ubifs/config
> . ~/xfstests/common/encrypt
> dev=$(__blkdev_to_ubi_volume /dev/vdc)
> ubiupdatevol $dev -t
> mount $dev /mnt -t ubifs
> mkdir /mnt/edir
> xfs_io -c set_encpolicy /mnt/edir
> rm /mnt/edir/_,,,,,DAAAAAAAAAAAAAAAAAAAAAAAAAA
>
>With the bug, the following assertion fails on the 'rm' command:
>
> [ 19.066048] UBIFS error (ubi0:0 pid 379): ubifs_assert_failed: UBIFS assert failed: !(hash & ~UBIFS_S_KEY_HASH_MASK), in fs/ubifs/key.h:170
>
>Fixes: f4f61d2cc6d8 ("ubifs: Implement encrypted filenames")
>Cc: <stable@vger.kernel.org> # v4.10+
>Link: https://lore.kernel.org/r/20200120223201.241390-5-ebiggers@kernel.org
>Signed-off-by: Eric Biggers <ebiggers@google.com>
Contextual conflicts due to missing 6eb61d587f45 ("ubifs: Pass struct
ubifs_info to ubifs_assert()"). Fixed up and queued up.
--
Thanks,
Sasha
prev parent reply other threads:[~2020-02-07 1:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-06 19:14 FAILED: patch "[PATCH] ubifs: don't trigger assertion on invalid no-key filename" failed to apply to 4.14-stable tree gregkh
2020-02-07 1:13 ` Sasha Levin [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=20200207011341.GR31482@sasha-vm \
--to=sashal@kernel.org \
--cc=ebiggers@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=stable@vger.kernel.org \
/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