Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1637638
| From | David Miller <davem@davemloft.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] bna: Avoid reading past end of buffer |
| Date | 2017-05-08 20:50 +0200 |
| Message-ID | <tEVTk-7AT-11@gated-at.bofh.it> (permalink) |
| References | <tDTTA-7R3-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Kees Cook <keescook@chromium.org> Date: Fri, 5 May 2017 15:25:32 -0700 > Using memcpy() from a string that is shorter than the length copied means > the destination buffer is being filled with arbitrary data from the kernel > rodata segment. Instead, use strncpy() which will fill the trailing bytes > with zeros. > > This was found with the future CONFIG_FORTIFY_SOURCE feature. > > Cc: Daniel Micay <danielmicay@gmail.com> > Signed-off-by: Kees Cook <keescook@chromium.org> Applied.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] bna: Avoid reading past end of buffer Kees Cook <keescook@chromium.org> - 2017-05-06 00:30 +0200 Re: [PATCH] bna: Avoid reading past end of buffer David Miller <davem@davemloft.net> - 2017-05-08 20:50 +0200
csiph-web