kernel_samsung_a53x/drivers/net/ethernet/marvell/octeontx2/af
Bui Quang Minh dfe8b70ee9 octeontx2-af: avoid off-by-one read from userspace
[ Upstream commit f299ee709fb45036454ca11e90cb2810fe771878 ]

We try to access count + 1 byte from userspace with memdup_user(buffer,
count + 1). However, the userspace only provides buffer of count bytes and
only these count bytes are verified to be okay to access. To ensure the
copied buffer is NUL terminated, we use memdup_user_nul instead.

Fixes: 3a2eb515d136 ("octeontx2-af: Fix an off by one in rvu_dbg_qsize_write()")
Signed-off-by: Bui Quang Minh <minhquangbui99@gmail.com>
Link: https://lore.kernel.org/r/20240424-fix-oob-read-v2-6-f1f1b53a10f4@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 11:32:42 +01:00
..
cgx.c Octeontx2-af: fix pause frame configuration in GMP mode 2024-11-19 09:22:44 +01:00
cgx.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cgx_fw_if.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
common.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mbox.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mbox.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
npc.h octeontx2-af: Fix marking couple of structure as __packed 2024-11-18 12:12:06 +01:00
npc_profile.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ptp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ptp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rvu.c octeontx2-af: Use separate handlers for interrupts 2024-11-19 08:44:59 +01:00
rvu.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rvu_cgx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rvu_debugfs.c octeontx2-af: avoid off-by-one read from userspace 2024-11-19 11:32:42 +01:00
rvu_nix.c octeontx2-af: Fix NIX SQ mode and BP config 2024-11-19 11:32:19 +01:00
rvu_npa.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rvu_npc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rvu_reg.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rvu_reg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rvu_struct.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rvu_trace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rvu_trace.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00