No description
Find a file
Christophe JAILLET d7b2df9742 dmaengine: mcf-edma: Fix a potential un-allocated memory access
commit 0a46781c89 upstream.

When 'mcf_edma' is allocated, some space is allocated for a
flexible array at the end of the struct. 'chans' item are allocated, that is
to say 'pdata->dma_channels'.

Then, this number of item is stored in 'mcf_edma->n_chans'.

A few lines later, if 'mcf_edma->n_chans' is 0, then a default value of 64
is set.

This ends to no space allocated by devm_kzalloc() because chans was 0, but
64 items are read and/or written in some not allocated memory.

Change the logic to define a default value before allocating the memory.

Fixes: e7a3ff92ea ("dmaengine: fsl-edma: add ColdFire mcf5441x edma support")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/f55d914407c900828f6fad3ea5fa791a5f17b9a4.1685172449.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-16 18:19:24 +02:00
arch x86: Move gds_ucode_mitigated() declaration to header 2023-08-16 18:19:23 +02:00
block block/partition: fix signedness issue for Amiga partitions 2023-07-27 08:37:29 +02:00
certs certs/blacklist_hashes.c: fix const confusion in certs blacklist 2022-06-22 14:11:22 +02:00
crypto KEYS: asymmetric: Copy sig and digest in public_key_verify_signature() 2023-06-21 15:44:08 +02:00
Documentation Documentation: security-bugs.rst: clarify CVE handling 2023-08-11 11:53:52 +02:00
drivers dmaengine: mcf-edma: Fix a potential un-allocated memory access 2023-08-16 18:19:24 +02:00
fs nilfs2: fix use-after-free of nilfs_root in dirtying inodes via iput 2023-08-16 18:19:23 +02:00
include wifi: cfg80211: fix sband iftype data lookup for AP_VLAN 2023-08-16 18:19:24 +02:00
init x86/mm: Initialize text poking earlier 2023-08-08 19:56:36 +02:00
ipc ipc/sem: Fix dangling sem_array access in semtimedop race 2022-12-08 11:23:06 +01:00
kernel perf: Fix function pointer case 2023-08-11 11:53:54 +02:00
lib test_firmware: return ENOMEM instead of ENOSPC on failed memory allocation 2023-08-11 11:54:00 +02:00
LICENSES
mm mm: make wait_on_page_writeback() wait for multiple pending writebacks 2023-06-28 10:18:42 +02:00
net dccp: fix data-race around dp->dccps_mss_cache 2023-08-16 18:19:24 +02:00
samples samples/bpf: Fix buffer overflow in tcp_basertt 2023-07-27 08:37:07 +02:00
scripts modpost: fix off by one in is_executable_section() 2023-07-27 08:37:18 +02:00
security keys: Fix linking a duplicate key to a keyring's assoc_array 2023-08-11 11:53:47 +02:00
sound ASoC: cs42l51: fix driver to properly autoload with automatic module loading 2023-08-11 11:53:54 +02:00
tools selftests/rseq: Fix build with undefined __weak 2023-08-16 18:19:23 +02:00
usr initramfs: restore default compression behavior 2020-04-08 09:08:38 +02:00
virt KVM: Destroy target device if coalesced MMIO unregistration fails 2023-03-11 16:44:01 +01:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap ARM: SoC fixes 2019-11-10 13:41:59 -08:00
COPYING
CREDITS MAINTAINERS: Remove Simon as Renesas SoC Co-Maintainer 2019-10-10 08:12:51 -07:00
Kbuild
Kconfig
MAINTAINERS Remove DECnet support from kernel 2023-06-21 15:44:10 +02:00
Makefile Linux 5.4.253 2023-08-11 11:54:02 +02:00
README

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

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

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.