No description
Find a file
Brian Foster 879427c02d xfs: fix attr leaf header freemap.size underflow
[ Upstream commit 2a2b5932db ]

The leaf format xattr addition helper xfs_attr3_leaf_add_work()
adjusts the block freemap in a couple places. The first update drops
the size of the freemap that the caller had already selected to
place the xattr name/value data. Before the function returns, it
also checks whether the entries array has encroached on a freemap
range by virtue of the new entry addition. This is necessary because
the entries array grows from the start of the block (but end of the
block header) towards the end of the block while the name/value data
grows from the end of the block in the opposite direction. If the
associated freemap is already empty, however, size is zero and the
subtraction underflows the field and causes corruption.

This is reproduced rarely by generic/070. The observed behavior is
that a smaller sized freemap is aligned to the end of the entries
list, several subsequent xattr additions land in larger freemaps and
the entries list expands into the smaller freemap until it is fully
consumed and then underflows. Note that it is not otherwise a
corruption for the entries array to consume an empty freemap because
the nameval list (i.e. the firstused pointer in the xattr header)
starts beyond the end of the corrupted freemap.

Update the freemap size modification to account for the fact that
the freemap entry can be empty and thus stale.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-01 13:12:29 +02:00
arch x86/ioapic: Unbreak check_timer() 2020-10-01 13:12:27 +02:00
block block: ensure bdi->io_pages is always initialized 2020-09-12 13:39:11 +02:00
certs Replace magic for trusting the secondary keyring with #define 2018-09-09 19:55:54 +02:00
crypto crypto: af_alg - fix use-after-free in af_alg_accept() due to bh_lock_sock() 2020-07-09 09:36:30 +02:00
Documentation affs: fix basic permission bits to actually work 2020-09-09 19:03:12 +02:00
drivers RDMA/i40iw: Fix potential use after free 2020-10-01 13:12:29 +02:00
firmware Fix built-in early-load Intel microcode alignment 2020-01-23 08:20:30 +01:00
fs xfs: fix attr leaf header freemap.size underflow 2020-10-01 13:12:29 +02:00
include net: add __must_check to skb_put_padto() 2020-10-01 13:12:25 +02:00
init x86: Fix early boot crash on gcc-10, third try 2020-05-20 08:17:15 +02:00
ipc ipc/util.c: sysvipc_find_ipc() incorrectly updates position index 2020-05-20 08:17:07 +02:00
kernel tracing: Adding NULL checks for trace_array descriptor pointer 2020-10-01 13:12:28 +02:00
lib test_kmod: avoid potential double free in trigger_config_run_type() 2020-08-21 09:48:22 +02:00
mm mm: fix double page fault on arm64 if PTE_AF is cleared 2020-10-01 13:12:26 +02:00
net ipv4: Update exception handling for multipath routes via same device 2020-10-01 13:12:25 +02:00
samples samples: bpf: Fix build error 2020-06-03 08:17:55 +02:00
scripts checkpatch: fix the usage of capture group ( ... ) 2020-09-09 19:03:13 +02:00
security Smack: prevent underflow in smk_set_cipso() 2020-08-21 09:48:11 +02:00
sound ALSA: hda/realtek - Couldn't detect Mic if booting with headset plugged 2020-10-01 13:12:27 +02:00
tools perf test: Free formats for perf pmu parse test 2020-09-23 10:46:35 +02:00
usr initramfs: restore default compression behavior 2020-04-13 10:34:19 +02:00
virt KVM: fix memory leak in kvm_io_bus_unregister_dev() 2020-10-01 13:12:23 +02:00
.cocciconfig
.get_maintainer.ignore
.gitattributes .gitattributes: set git diff driver for C source code files 2016-10-07 18:46:30 -07:00
.gitignore kbuild: rpm-pkg: keep spec file until make mrproper 2018-02-13 10:19:46 +01:00
.mailmap .mailmap: Add Maciej W. Rozycki's Imagination e-mail address 2017-11-10 12:16:15 -08:00
COPYING
CREDITS MAINTAINERS: update TPM driver infrastructure changes 2017-11-09 17:58:40 -08:00
Kbuild License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
MAINTAINERS MAINTAINERS: Update drm/i915 bug filing URL 2020-02-28 16:36:12 +01:00
Makefile Linux 4.14.199 2020-09-23 10:46:37 +02:00
README README: add a new README file, pointing to the Documentation/ 2016-10-24 08:12:35 -02:00

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

This file was moved to Documentation/admin-guide/README.rst

Please notice that there are several guides for kernel developers and users.
These guides can be rendered in a number of formats, like HTML and PDF.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

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.