Subject: CVE-2024-42320: s390/dasd: fix error checks in dasd_copy_pair_store()

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

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

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

s390/dasd: fix error checks in dasd_copy_pair_store()

dasd_add_busid() can return an error via ERR_PTR() if an allocation
fails. However, two callsites in dasd_copy_pair_store() do not check
the result, potentially resulting in a NULL pointer dereference. Fix
this by checking the result with IS_ERR() and returning the error up
the stack.

The Linux kernel CVE team has assigned CVE-2024-42320 to this issue.

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

	Issue introduced in 6.1 with commit a91ff09d39f9 and fixed in 6.1.103 with commit cc8b7284d507
	Issue introduced in 6.1 with commit a91ff09d39f9 and fixed in 6.6.44 with commit e511167e65d3
	Issue introduced in 6.1 with commit a91ff09d39f9 and fixed in 6.10.3 with commit 68d4c3722290
	Issue introduced in 6.1 with commit a91ff09d39f9 and fixed in 6.11 with commit 8e64d2356cbc
	Issue introduced in 5.15.153 with commit 932600a295cc

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-2024-42320
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:
	drivers/s390/block/dasd_devmap.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/cc8b7284d5076722e0b8062373b68d8e47c3bace
	https://git.kernel.org/stable/c/e511167e65d332d07b3c7a3d5a741ee9c19a8c27
	https://git.kernel.org/stable/c/68d4c3722290ad300c295fb3435e835d200d5cb2
	https://git.kernel.org/stable/c/8e64d2356cbc800b4cd0e3e614797f76bcf0cdb8