No description
Find a file
Damien Le Moal 350d66d9e7 zonefs: Detect append writes at invalid locations
commit a608da3bd7 upstream.

Using REQ_OP_ZONE_APPEND operations for synchronous writes to sequential
files succeeds regardless of the zone write pointer position, as long as
the target zone is not full. This means that if an external (buggy)
application writes to the zone of a sequential file underneath the file
system, subsequent file write() operation will succeed but the file size
will not be correct and the file will contain invalid data written by
another application.

Modify zonefs_file_dio_append() to check the written sector of an append
write (returned in bio->bi_iter.bi_sector) and return -EIO if there is a
mismatch with the file zone wp offset field. This change triggers a call
to zonefs_io_error() and a zone check. Modify zonefs_io_error_cb() to
not expose the unexpected data after the current inode size when the
errors=remount-ro mode is used. Other error modes are correctly handled
already.

Fixes: 02ef12a663 ("zonefs: use REQ_OP_ZONE_APPEND for sync DIO")
Cc: stable@vger.kernel.org
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-24 07:22:42 +01:00
arch perf/x86/rapl: Treat Tigerlake like Icelake 2023-01-24 07:22:42 +01:00
block block: handle bio_split_to_limits() NULL return 2023-01-18 11:48:58 +01:00
certs certs/blacklist_hashes.c: fix const confusion in certs blacklist 2022-06-22 14:22:01 +02:00
crypto crypto: tcrypt - Fix multibuffer skcipher speed test mem leak 2022-12-31 13:14:24 +01:00
Documentation KVM: x86: Do not return host topology information from KVM_GET_SUPPORTED_CPUID 2023-01-18 11:48:57 +01:00
drivers Add exception protection processing for vd in axi_chan_handle_err function 2023-01-24 07:22:42 +01:00
fs zonefs: Detect append writes at invalid locations 2023-01-24 07:22:42 +01:00
include btrfs: fix trace event name typo for FLUSH_DELAYED_REFS 2023-01-24 07:22:41 +01:00
init init/Kconfig: fix CC_HAS_ASM_GOTO_TIED_OUTPUT test with dash 2022-12-02 17:41:08 +01:00
io_uring io_uring/io-wq: only free worker if it was allocated for creation 2023-01-18 11:48:58 +01:00
ipc ipc/sem: Fix dangling sem_array access in semtimedop race 2022-12-08 11:28:45 +01:00
kernel sched/core: Fix use-after-free bug in dup_user_cpus_ptr() 2023-01-18 11:48:52 +01:00
lib overflow: Implement size_t saturating arithmetic helpers 2022-12-31 13:14:33 +01:00
LICENSES LICENSES/dual/CC-BY-4.0: Git rid of "smart quotes" 2021-07-15 06:31:24 -06:00
mm mm: Always release pages to the buddy allocator in memblock_free_late(). 2023-01-18 11:48:57 +01:00
net wifi: mac80211: sdata can be NULL during AMPDU start 2023-01-24 07:22:42 +01:00
samples samples: vfio-mdev: Fix missing pci_disable_device() in mdpy_fb_probe() 2022-12-31 13:14:31 +01:00
scripts scripts/faddr2line: Fix regression in name resolution on ppc64le 2022-12-08 11:28:38 +01:00
security device_cgroup: Roll back to original exceptions after copy failure 2023-01-12 11:58:59 +01:00
sound ALSA: usb-audio: Relax hw constraints for implicit fb sync 2023-01-18 11:48:54 +01:00
tools tools/virtio: initialize spinlocks in vring_test.c 2023-01-24 07:22:41 +01:00
usr usr/include/Makefile: add linux/nfc.h to the compile-test coverage 2022-02-01 17:27:15 +01:00
virt kvm: Add support for arch compat vm ioctls 2022-10-29 10:12:54 +02:00
.clang-format clang-format: Update with the latest for_each macro list 2021-05-12 23:32:39 +02:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore .gitignore: ignore only top-level modules.builtin 2021-05-02 00:43:35 +09:00
.mailmap mailmap: add Andrej Shadura 2021-10-18 20:22:03 -10:00
COPYING
CREDITS MAINTAINERS: Move Daniel Drake to credits 2021-09-21 08:34:58 +03:00
Kbuild
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS futex: Move to kernel/futex/ 2022-12-31 13:14:04 +01:00
Makefile Linux 5.15.89 2023-01-18 11:48:59 +01:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.