[Intel-wired-lan] [PATCH v2 6/6] octeontx2-af: avoid off-by-one read from userspace

2024-04-24 Thread Bui Quang Minh
: 3a2eb515d136 ("octeontx2-af: Fix an off by one in rvu_dbg_qsize_write()") Signed-off-by: Bui Quang Minh --- drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c

[Intel-wired-lan] [PATCH v2 5/6] cio: ensure the copied buf is NUL terminated

2024-04-24 Thread Bui Quang Minh
Fixes: a4f17cc72671 ("s390/cio: add CRW inject functionality") Signed-off-by: Bui Quang Minh --- drivers/s390/cio/cio_inject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/s390/cio/cio_inject.c b/drivers/s390/cio/cio_inject.c index 8613fa937237..a2e771ebae

[Intel-wired-lan] [PATCH v2 4/6] qedf: ensure the copied buf is NUL terminated

2024-04-24 Thread Bui Quang Minh
r_nul instead of memdup_user. Fixes: 61d8658b4a43 ("scsi: qedf: Add QLogic FastLinQ offload FCoE driver framework.") Signed-off-by: Bui Quang Minh --- drivers/scsi/qedf/qedf_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qedf/qedf_debugfs.c b/dr

[Intel-wired-lan] [PATCH v2 3/6] bfa: ensure the copied buf is NUL terminated

2024-04-24 Thread Bui Quang Minh
stead of memdup_user. Fixes: 9f30b674759b ("bfa: replace 2 kzalloc/copy_from_user by memdup_user") Signed-off-by: Bui Quang Minh --- drivers/scsi/bfa/bfad_debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/bfa/bfad_debugfs.c b/drivers/scsi/bfa

[Intel-wired-lan] [PATCH v2 2/6] bna: ensure the copied buf is NUL terminated

2024-04-24 Thread Bui Quang Minh
stead of memdup_user. Fixes: 7afc5dbde091 ("bna: Add debugfs interface.") Signed-off-by: Bui Quang Minh --- drivers/net/ethernet/brocade/bna/bnad_debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/brocade/bna/bnad_debugfs.c b/drive

[Intel-wired-lan] [PATCH v2 1/6] ice: ensure the copied buf is NUL terminated

2024-04-24 Thread Bui Quang Minh
r_nul instead of memdup_user. Fixes: 96a9a9341cda ("ice: configure FW logging") Fixes: 73671c3162c8 ("ice: enable FW logging") Reviewed-by: Przemek Kitszel Signed-off-by: Bui Quang Minh --- drivers/net/ethernet/intel/ice/ice_debugfs.c | 8 1 file changed, 4 insertions

[Intel-wired-lan] [PATCH v2 0/6] Ensure the copied buf is NUL terminated

2024-04-24 Thread Bui Quang Minh
-...@lists.osuosl.org Cc: net...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Cc: linux-s...@vger.kernel.org Cc: Saurav Kashyap Cc: linux-s...@vger.kernel.org Cc: Jens Axboe Signed-off-by: Bui Quang Minh Changes in v2: - Patch 5: use memdup_user_nul instead - Add patch 6 - Link to v1: https

Re: [Intel-wired-lan] [PATCH 5/5] drivers/s390/cio: ensure the copied buf is NULL terminated

2024-04-23 Thread Bui Quang Minh
On 4/23/24 13:50, Heiko Carstens wrote: On Mon, Apr 22, 2024 at 11:41:40PM +0700, Bui Quang Minh wrote: Currently, we allocate a lbuf-sized kernel buffer and copy lbuf from userspace to that buffer. Later, we use scanf on this buffer but we don't ensure that the string is terminated insid

[Intel-wired-lan] [PATCH 5/5] drivers/s390/cio: ensure the copied buf is NULL terminated

2024-04-22 Thread Bui Quang Minh
e end of buffer and write NULL terminator to the end of buffer after userspace copying. Fixes: a4f17cc72671 ("s390/cio: add CRW inject functionality") Signed-off-by: Bui Quang Minh --- drivers/s390/cio/cio_inject.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/d

[Intel-wired-lan] [PATCH 4/5] drivers/scsi/qedf: ensure the copied buf is NULL terminated

2024-04-22 Thread Bui Quang Minh
r_nul instead of memdup_user. Fixes: 61d8658b4a43 ("scsi: qedf: Add QLogic FastLinQ offload FCoE driver framework.") Signed-off-by: Bui Quang Minh --- drivers/scsi/qedf/qedf_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qedf/qedf_debugfs.c b/dr

[Intel-wired-lan] [PATCH 3/5] drivers/scsi/bfa/bfad: ensure the copied buf is NULL terminated

2024-04-22 Thread Bui Quang Minh
stead of memdup_user. Fixes: 9f30b674759b ("bfa: replace 2 kzalloc/copy_from_user by memdup_user") Signed-off-by: Bui Quang Minh --- drivers/scsi/bfa/bfad_debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/bfa/bfad_debugfs.c b/drivers/scsi/bfa

[Intel-wired-lan] [PATCH 2/5] drivers/net/brocade-bnad: ensure the copied buf is NULL terminated

2024-04-22 Thread Bui Quang Minh
stead of memdup_user. Fixes: 7afc5dbde091 ("bna: Add debugfs interface.") Signed-off-by: Bui Quang Minh --- drivers/net/ethernet/brocade/bna/bnad_debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/brocade/bna/bnad_debugfs.c b/drive

[Intel-wired-lan] [PATCH 1/5] drivers/net/ethernet/intel-ice: ensure the copied buf is NULL terminated

2024-04-22 Thread Bui Quang Minh
r_nul instead of memdup_user. Fixes: 96a9a9341cda ("ice: configure FW logging") Fixes: 73671c3162c8 ("ice: enable FW logging") Signed-off-by: Bui Quang Minh --- drivers/net/ethernet/intel/ice/ice_debugfs.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/d

[Intel-wired-lan] [PATCH 0/5] Ensure the copied buf is NULL terminated

2024-04-22 Thread Bui Quang Minh
kern_buf in string-related functions. This series fix the above issue by replacing memdup_user with memdup_user_nul or allocating count + 1 buffer then writing the NULL terminator to end of buffer after userspace copying. Thanks, Quang Minh. Signed-off-by: Bui Quang Minh --- Bui Quang Minh (5