lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Wed, 24 Apr 2024 21:44:17 +0700
From: Bui Quang Minh <minhquangbui99@...il.com>
To: Jesse Brandeburg <jesse.brandeburg@...el.com>, 
 Tony Nguyen <anthony.l.nguyen@...el.com>, 
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, 
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, 
 Paul M Stillwell Jr <paul.m.stillwell.jr@...el.com>, 
 Rasesh Mody <rmody@...vell.com>, Sudarsana Kalluru <skalluru@...vell.com>, 
 GR-Linux-NIC-Dev@...vell.com, Anil Gurumurthy <anil.gurumurthy@...gic.com>, 
 Sudarsana Kalluru <sudarsana.kalluru@...gic.com>, 
 "James E.J. Bottomley" <James.Bottomley@...senPartnership.com>, 
 "Martin K. Petersen" <martin.petersen@...cle.com>, 
 Fabian Frederick <fabf@...net.be>, Saurav Kashyap <skashyap@...vell.com>, 
 GR-QLogic-Storage-Upstream@...vell.com, 
 Nilesh Javali <nilesh.javali@...ium.com>, Arun Easi <arun.easi@...ium.com>, 
 Manish Rangankar <manish.rangankar@...ium.com>, 
 Vineeth Vijayan <vneethv@...ux.ibm.com>, 
 Peter Oberparleiter <oberpar@...ux.ibm.com>, 
 Heiko Carstens <hca@...ux.ibm.com>, Vasily Gorbik <gor@...ux.ibm.com>, 
 Alexander Gordeev <agordeev@...ux.ibm.com>, 
 Christian Borntraeger <borntraeger@...ux.ibm.com>, 
 Sven Schnelle <svens@...ux.ibm.com>, Sunil Goutham <sgoutham@...vell.com>, 
 Linu Cherian <lcherian@...vell.com>, Geetha sowjanya <gakula@...vell.com>, 
 Jerin Jacob <jerinj@...vell.com>, hariprasad <hkelam@...vell.com>, 
 Subbaraya Sundeep <sbhatta@...vell.com>
Cc: intel-wired-lan@...ts.osuosl.org, netdev@...r.kernel.org, 
 linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org, 
 Saurav Kashyap <saurav.kashyap@...ium.com>, linux-s390@...r.kernel.org, 
 Jens Axboe <axboe@...nel.dk>, Bui Quang Minh <minhquangbui99@...il.com>, 
 Przemek Kitszel <przemyslaw.kitszel@...el.com>
Subject: [PATCH v2 0/6] Ensure the copied buf is NUL terminated

Hi everyone,

I found that some drivers contains an out-of-bound read pattern like this

	kern_buf = memdup_user(user_buf, count);
	...
	sscanf(kern_buf, ...);

The sscanf can be replaced by some other string-related functions. This
pattern can lead to out-of-bound read of kern_buf in string-related
functions.

This series fix the above issue by replacing memdup_user with
memdup_user_nul.

Thanks,
Quang Minh.

To: Jesse Brandeburg <jesse.brandeburg@...el.com>
To: Tony Nguyen <anthony.l.nguyen@...el.com>
To: David S. Miller <davem@...emloft.net>
To: Eric Dumazet <edumazet@...gle.com>
To: Jakub Kicinski <kuba@...nel.org>
To: Paolo Abeni <pabeni@...hat.com>
To: Paul M Stillwell Jr <paul.m.stillwell.jr@...el.com>
To: Rasesh Mody <rmody@...vell.com>
To: Sudarsana Kalluru <skalluru@...vell.com>
To: GR-Linux-NIC-Dev@...vell.com
To: Anil Gurumurthy <anil.gurumurthy@...gic.com>
To: Sudarsana Kalluru <sudarsana.kalluru@...gic.com>
To: James E.J. Bottomley <James.Bottomley@...senPartnership.com>
To: Martin K. Petersen <martin.petersen@...cle.com>
To: Fabian Frederick <fabf@...net.be>
To: Saurav Kashyap <skashyap@...vell.com>
To: GR-QLogic-Storage-Upstream@...vell.com
To: Nilesh Javali <nilesh.javali@...ium.com>
To: Arun Easi <arun.easi@...ium.com>
To: Manish Rangankar <manish.rangankar@...ium.com>
To: Vineeth Vijayan <vneethv@...ux.ibm.com>
To: Peter Oberparleiter <oberpar@...ux.ibm.com>
To: Heiko Carstens <hca@...ux.ibm.com>
To: Vasily Gorbik <gor@...ux.ibm.com>
To: Alexander Gordeev <agordeev@...ux.ibm.com>
To: Christian Borntraeger <borntraeger@...ux.ibm.com>
To: Sven Schnelle <svens@...ux.ibm.com>
To: Dupuis, Chad <chad.dupuis@...ium.com>
To: Sunil Goutham <sgoutham@...vell.com>
To: Linu Cherian <lcherian@...vell.com>
To: Geetha sowjanya <gakula@...vell.com>
To: Jerin Jacob <jerinj@...vell.com>
To: hariprasad <hkelam@...vell.com>
To: Subbaraya Sundeep <sbhatta@...vell.com>
Cc: intel-wired-lan@...ts.osuosl.org
Cc: netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Cc: linux-scsi@...r.kernel.org
Cc: Saurav Kashyap <saurav.kashyap@...ium.com>
Cc: linux-s390@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>
Signed-off-by: Bui Quang Minh <minhquangbui99@...il.com>

Changes in v2:
- Patch 5: use memdup_user_nul instead
- Add patch 6
- Link to v1: https://lore.kernel.org/r/20240422-fix-oob-read-v1-0-e02854c30174@gmail.com

---
Bui Quang Minh (6):
      ice: ensure the copied buf is NUL terminated
      bna: ensure the copied buf is NUL terminated
      bfa: ensure the copied buf is NUL terminated
      qedf: ensure the copied buf is NUL terminated
      cio: ensure the copied buf is NUL terminated
      octeontx2-af: avoid off-by-one read from userspace

 drivers/net/ethernet/brocade/bna/bnad_debugfs.c         | 4 ++--
 drivers/net/ethernet/intel/ice/ice_debugfs.c            | 8 ++++----
 drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c | 4 +---
 drivers/s390/cio/cio_inject.c                           | 2 +-
 drivers/scsi/bfa/bfad_debugfs.c                         | 4 ++--
 drivers/scsi/qedf/qedf_debugfs.c                        | 2 +-
 6 files changed, 11 insertions(+), 13 deletions(-)
---
base-commit: ed30a4a51bb196781c8058073ea720133a65596f
change-id: 20240422-fix-oob-read-19ae7f8f3711

Best regards,
-- 
Bui Quang Minh <minhquangbui99@...il.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ