From: Dave Chinner <david@fromorbit.com>
To: Zorro Lang <zlang@redhat.com>
Cc: fstests@vger.kernel.org, djwong@kernel.org
Subject: Re: [PATCH 2/2] fstests: test dirty pipe vulnerability issue of CVE-2022-0847
Date: Tue, 22 Mar 2022 16:35:55 +1100 [thread overview]
Message-ID: <20220322053555.GD1609613@dread.disaster.area> (raw)
In-Reply-To: <20220321110341.1323882-3-zlang@redhat.com>
On Mon, Mar 21, 2022 at 07:03:41PM +0800, Zorro Lang wrote:
> diff --git a/tests/generic/999 b/tests/generic/999
> new file mode 100755
> index 00000000..2488e455
> --- /dev/null
> +++ b/tests/generic/999
> @@ -0,0 +1,54 @@
> +#! /bin/bash
> +# SPDX-License-Identifier: GPL-2.0
> +# Copyright (c) 2022 Red Hat, Inc. All Rights Reserved.
> +#
> +# FS QA Test No. 999
> +#
> +# Test for the Dirty Pipe vulnerability (CVE-2022-0847) caused by an
> +# uninitialized "pipe_buffer.flags" variable, which fixed by:
> +# 9d2231c5d74e ("lib/iov_iter: initialize "flags" in new pipe_buffer")
> +#
> +. ./common/preamble
> +_begin_fstest auto quick
> +
> +_cleanup()
> +{
> + cd /
> + rm -f $tmp.*
> + rm -f $TEST_DIR/testfile.$seq
> +}
Just leave the test file lying around so this can use the default
cleanup method. The test device is supposed to gather random
cruft as tests run....
> +
> +# real QA test starts here
> +_supported_fs generic
> +_require_test
> +_require_user
> +_require_chmod
> +_require_test_program "splice2pipe"
> +
> +localfile=$TEST_DIR/testfile.$seq
.... and remove the file here as part of test setup with:
rm -f $localfile
Otherwise looks fine.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2022-03-22 5:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-21 11:03 [PATCH 0/2] xfstests: hexdump and CVE-2022-0847 Zorro Lang
2022-03-21 11:03 ` [PATCH 1/2] xfstests: replace hexdump with od command Zorro Lang
2022-03-22 5:22 ` Dave Chinner
2022-03-22 12:20 ` Zorro Lang
2022-03-22 15:54 ` Darrick J. Wong
2022-03-22 17:10 ` Zorro Lang
2022-03-21 11:03 ` [PATCH 2/2] fstests: test dirty pipe vulnerability issue of CVE-2022-0847 Zorro Lang
2022-03-22 5:35 ` Dave Chinner [this message]
2022-03-22 12:30 ` Zorro Lang
2022-03-22 15:52 ` Darrick J. Wong
2022-03-22 17:13 ` Zorro Lang
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=20220322053555.GD1609613@dread.disaster.area \
--to=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=zlang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.