-
Notifications
You must be signed in to change notification settings - Fork 696
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
linux-esx: tarfs: fixes buffer overflow from strlen()
- If strlen(buffer) and buffer size is 100 and if buffer consist of non-null terminating 100bytes then __fortify_strlen() detects buffer overflow and hit BUG() in kernel code. [ 496.370015] detected buffer overflow in __fortify_strlen [ 496.370079] ------------[ cut here ]------------ [ 496.370081] kernel BUG at lib/string_helpers.c:1027! [ 496.370101] invalid opcode: 0000 [#1] SMP PTI [ 496.370111] CPU: 0 PID: 1179 Comm: mount Not tainted 6.1.10-6.ph5-esx #1-photon [ 496.370124] Hardware name: VMware, Inc. VMware7,1/440BX Desktop Reference Platform, BIOS VMW71.00V.9318676.B64.1807270745 07/27/2018 [ 496.370146] RIP: 0010:fortify_panic+0x13/0x15 - fixes this by replacing strlen with strnlen Change-Id: I1b7f1880789b18d89dfe5b3515779bdcb3a4bb6f Signed-off-by: Ankit Jain <ankitja@vmware.com> Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/20573 Tested-by: gerrit-photon <photon-checkins@vmware.com> Reviewed-by: Tapas Kundu <tkundu@vmware.com>
- Loading branch information
Showing
2 changed files
with
23 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters