Summary: | smb_strdupin() does not properly check the length of string duped-in | ||
---|---|---|---|
Product: | Base System | Reporter: | Meng Xu <meng.xu> |
Component: | kern | Assignee: | Conrad Meyer <cem> |
Status: | Closed FIXED | ||
Severity: | Affects Some People | CC: | 39librosweb, alexlen593, cadenjacob98, cem, deletehistoryfree, delphij, heatherrosado4, jm398964, mariadenial1123, michael.osipov, pswag994, swills, tablosazi.farahan |
Priority: | --- | ||
Version: | CURRENT | ||
Hardware: | Any | ||
OS: | Any |
Description
Meng Xu
2017-09-29 14:17:19 UTC
A commit references this bug: Author: cem Date: Fri Sep 29 15:53:26 UTC 2017 New revision: 324102 URL: https://svnweb.freebsd.org/changeset/base/324102 Log: netsmb: Fix buggy/racy smb_strdupin() smb_strdupin() tried to roll a copyin() based strlen to allocate a buffer and then blindly copyin that size. Of course, a malicious user program could simultaneously manipulate the buffer, resulting in a non-terminated string being copied. Later assumptions in the code rely upon the string being nul-terminated. Just use copyinstr() and drop the racy sizing. PR: 222687 Reported by: Meng Xu <meng.xu AT gatech.edu> Security: possible local DoS Sponsored by: Dell EMC Isilon Changes: head/sys/netsmb/smb_subr.c Note: MITRE have assigned CVE-2017-15037 for this issue. MARKED AS SPAM MARKED AS SPAM MARKED AS SPAM Why hasn't this beeen MFCed? A commit references this bug: Author: markj Date: Sun Apr 1 16:43:30 UTC 2018 New revision: 331867 URL: https://svnweb.freebsd.org/changeset/base/331867 Log: MFC r324102 (by cem): netsmb: Fix buggy/racy smb_strdupin() PR: 222687 Changes: _U stable/11/ stable/11/sys/netsmb/smb_subr.c MARKED AS SPAM MARKED AS SPAM MARKED AS SPAM MARKED AS SPAM MARKED AS SPAM MARKED AS SPAM |