CVE-2023-53435: cassini: Fix a memory leak in the error handling path of cas_init_one()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
cassini: Fix a memory leak in the error handling path of cas_init_one()
cas_saturn_firmware_init() allocates some memory using vmalloc(). This memory is freed in the .remove() function but not it the error handling path of the probe.
Add the missing vfree() to avoid a memory leak, should an error occur.
The Linux kernel CVE team has assigned CVE-2023-53435 to this issue.
Affected and fixed versions
===========================
Issue introduced in 2.6.28 with commit fcaa40669cd798ca2ac0d15441e8a1d1145f2b16 and fixed in 4.14.316 with commit 11c0ed097a874156957b515d0ba7e356142eab87 Issue introduced in 2.6.28 with commit fcaa40669cd798ca2ac0d15441e8a1d1145f2b16 and fixed in 4.19.284 with commit 60d8e8b88087d68e10c8991a0f6733fa2f963ff0 Issue introduced in 2.6.28 with commit fcaa40669cd798ca2ac0d15441e8a1d1145f2b16 and fixed in 5.4.244 with commit e20105d967ab5b53ff50a0e5991fe37324d2ba20 Issue introduced in 2.6.28 with commit fcaa40669cd798ca2ac0d15441e8a1d1145f2b16 and fixed in 5.10.181 with commit dc61f7582cc92d547d02e141cd66f5d1f4ed8012 Issue introduced in 2.6.28 with commit fcaa40669cd798ca2ac0d15441e8a1d1145f2b16 and fixed in 5.15.113 with commit 234e744d86bd95b381d24546df2dba72804e0219 Issue introduced in 2.6.28 with commit fcaa40669cd798ca2ac0d15441e8a1d1145f2b16 and fixed in 6.1.30 with commit 172146c26f0c1b86ab4e9ebffc7e06f04229fa17 Issue introduced in 2.6.28 with commit fcaa40669cd798ca2ac0d15441e8a1d1145f2b16 and fixed in 6.3.4 with commit b8b1a667744741fa7807b09a12797a27f14f3fac Issue introduced in 2.6.28 with commit fcaa40669cd798ca2ac0d15441e8a1d1145f2b16 and fixed in 6.4 with commit 412cd77a2c24b191c65ea53025222418db09817c
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-2023-53435
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/net/ethernet/sun/cassini.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/11c0ed097a874156957b515d0ba7e356142eab87 https://git.kernel.org/stable/c/60d8e8b88087d68e10c8991a0f6733fa2f963ff0 https://git.kernel.org/stable/c/e20105d967ab5b53ff50a0e5991fe37324d2ba20 https://git.kernel.org/stable/c/dc61f7582cc92d547d02e141cd66f5d1f4ed8012 https://git.kernel.org/stable/c/234e744d86bd95b381d24546df2dba72804e0219 https://git.kernel.org/stable/c/172146c26f0c1b86ab4e9ebffc7e06f04229fa17 https://git.kernel.org/stable/c/b8b1a667744741fa7807b09a12797a27f14f3fac https://git.kernel.org/stable/c/412cd77a2c24b191c65ea53025222418db09817c