Home
last modified time | relevance | path

Searched hist:f299ee70 (Results 1 – 1 of 1) sorted by relevance

/linux/drivers/net/ethernet/marvell/octeontx2/af/
H A Drvu_debugfs.cf299ee70 Wed Apr 24 14:44:23 GMT 2024 Bui Quang Minh <minhquangbui99@gmail.com> octeontx2-af: avoid off-by-one read from userspace

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>