Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1700428
| From | Kees Cook <keescook@chromium.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] [RFC] fs/binfmt_elf: work around bogus ubsan array-bounds warning |
| Date | 2017-08-01 00:20 +0200 |
| Message-ID | <u9rcC-3sn-17@gated-at.bofh.it> (permalink) |
| References | <u9fEt-4EG-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Jul 31, 2017 at 2:52 AM, Arnd Bergmann <arnd@arndb.de> wrote: > Using copy_to_user instead of __copy_to_user shuts up the warning here > and is harmless, but is otherwise a completely bogus change as > the function is still using a mix of __copy_to_user and copy_to_user. > > I have not found out why create_elf_tables() uses the __copy_to_user > version in the first place, and the right answer might be that it > should simply use copy_to_user() and put_user() everywhere. IIUC, __copy*() is allowed here because the kernel is operating on an already sanity checked pointer (i.e. a freshly kernel-allocated stack). I wouldn't expect swapping in copy*() to have noticeable performance here, though if there was, it would be a constant change (the ELF tables are a per-arch fixed size). -Kees -- Kees Cook Pixel Security
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] [RFC] fs/binfmt_elf: work around bogus ubsan array-bounds warning Arnd Bergmann <arnd@arndb.de> - 2017-07-31 12:00 +0200 Re: [PATCH] [RFC] fs/binfmt_elf: work around bogus ubsan array-bounds warning Kees Cook <keescook@chromium.org> - 2017-08-01 00:20 +0200
csiph-web