Subject: CVE-2024-42248: tty: serial: ma35d1: Add a NULL check for of_node

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

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

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

tty: serial: ma35d1: Add a NULL check for of_node

The pdev->dev.of_node can be NULL if the "serial" node is absent.
Add a NULL check to return an error in such cases.

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

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

	Issue introduced in 6.5 with commit 930cbf92db01 and fixed in 6.6.41 with commit 23efa74cfe6e
	Issue introduced in 6.5 with commit 930cbf92db01 and fixed in 6.9.10 with commit 0e0e15ab2d3a
	Issue introduced in 6.5 with commit 930cbf92db01 and fixed in 6.10 with commit acd09ac253b5

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-42248
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/tty/serial/ma35d1_serial.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/23efa74cfe6eb923abb5b9bc51b2a04879013c67
	https://git.kernel.org/stable/c/0e0e15ab2d3a094a38525d23c03d78ec7d14a40e
	https://git.kernel.org/stable/c/acd09ac253b5de8fd79fc61a482ee19154914c7a