Subject: CVE-2022-48946: udf: Fix preallocation discarding at indirect extent boundary

From: Greg Kroah-Hartman <[email-masked]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

udf: Fix preallocation discarding at indirect extent boundary

When preallocation extent is the first one in the extent block, the
code would corrupt extent tree header instead. Fix the problem and use
udf_delete_aext() for deleting extent to avoid some code duplication.

The Linux kernel CVE team has assigned CVE-2022-48946 to this issue.

Affected and fixed versions
===========================

	Fixed in 4.9.337 with commit c8b6fa4511a7
	Fixed in 4.14.303 with commit 7665857f8855
	Fixed in 4.19.270 with commit 72f651c96c8a
	Fixed in 5.4.229 with commit 4d835efd561d
	Fixed in 5.10.161 with commit 1a075f4a5494
	Fixed in 5.15.85 with commit 63dbbd8f1499
	Fixed in 6.0.15 with commit ae56d9a01772
	Fixed in 6.1.1 with commit 12a88f572d6d
	Fixed in 6.2 with commit cfe4c1b25dd6

Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to
older supported kernel versions.  The official CVE entry at
	https://cve.org/CVERecord/?id=CVE-2022-48946
will be updated if fixes are backported, please check that for the most
up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
	fs/udf/truncate.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes.  Individual
changes are never tested alone, but rather are part of a larger kernel
release.  Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all.  If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
	https://git.kernel.org/stable/c/c8b6fa4511a7900db9fb0353b630d4d2ed1ba99c
	https://git.kernel.org/stable/c/7665857f88557c372da35534165721156756f77f
	https://git.kernel.org/stable/c/72f651c96c8aadf087fd782d551bf7db648a8c2e
	https://git.kernel.org/stable/c/4d835efd561dfb9bf5409f11f4ecd428d5d29226
	https://git.kernel.org/stable/c/1a075f4a549481ce6e8518d8379f193ccec6b746
	https://git.kernel.org/stable/c/63dbbd8f1499b0a161e701a04aa50148d60bd1f7
	https://git.kernel.org/stable/c/ae56d9a017724f130cf1a263dd82a78d2a6e3852
	https://git.kernel.org/stable/c/12a88f572d6d94b5c0b72e2d1782cc2e96ac06cf
	https://git.kernel.org/stable/c/cfe4c1b25dd6d2f056afc00b7c98bcb3dd0b1fc3