Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1681877
| From | Kees Cook <keescook@chromium.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [GIT PULL] gcc-plugins updates for v4.13-rc1 |
| Date | 2017-07-06 00:00 +0200 |
| Message-ID | <u00v0-3uT-23@gated-at.bofh.it> (permalink) |
| References | <tZKJz-1Ny-9@gated-at.bofh.it> <tZXQu-1WT-19@gated-at.bofh.it> <tZZpg-2RM-19@gated-at.bofh.it> <u00bF-3nZ-33@gated-at.bofh.it> <u00lk-3rk-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Jul 5, 2017 at 2:48 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Wed, Jul 5, 2017 at 11:35 PM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
>
>> So the issue I think would be good to fix is perhaps best explained by
>> pseudo-code
>>
>> int testfn(struct somestruct __user *p)
>> {
>> struct somestruct a;
>>
>> initialize_struct(&a);
>> if (copy_to_user(p, &a, sizeof(a)))
>> return -EFAULT;
>> return 0;
>> }
>>
>> which is obviously made-up code, but is not actually entirely unrealistic.
>
> This particular example should be handled by
> scripts/gcc-plugins/structleak_plugin.c, right?
Only if struct somestruct _contains_ a __user pointer. I would love to
see this logic expanded, of course. :)
-Kees
--
Kees Cook
Pixel Security
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL] gcc-plugins updates for v4.13-rc1 Kees Cook <keescook@chromium.org> - 2017-07-05 07:10 +0200
Re: [GIT PULL] gcc-plugins updates for v4.13-rc1 Linus Torvalds <torvalds@linux-foundation.org> - 2017-07-05 21:10 +0200
Re: [GIT PULL] gcc-plugins updates for v4.13-rc1 Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-07-05 22:50 +0200
Re: [GIT PULL] gcc-plugins updates for v4.13-rc1 Linus Torvalds <torvalds@linux-foundation.org> - 2017-07-05 23:40 +0200
Re: [GIT PULL] gcc-plugins updates for v4.13-rc1 Arnd Bergmann <arnd@arndb.de> - 2017-07-05 23:50 +0200
Re: [GIT PULL] gcc-plugins updates for v4.13-rc1 Kees Cook <keescook@chromium.org> - 2017-07-06 00:00 +0200
Re: [GIT PULL] gcc-plugins updates for v4.13-rc1 Linus Torvalds <torvalds@linux-foundation.org> - 2017-07-06 00:00 +0200
Re: [GIT PULL] gcc-plugins updates for v4.13-rc1 Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-07-06 00:30 +0200
Re: [GIT PULL] gcc-plugins updates for v4.13-rc1 Linus Torvalds <torvalds@linux-foundation.org> - 2017-07-06 00:40 +0200
Re: [GIT PULL] gcc-plugins updates for v4.13-rc1 Andrey Ryabinin <ryabinin.a.a@gmail.com> - 2017-07-06 00:50 +0200
Re: [GIT PULL] gcc-plugins updates for v4.13-rc1 Arnd Bergmann <arnd@arndb.de> - 2017-07-05 23:20 +0200
Re: [GIT PULL] gcc-plugins updates for v4.13-rc1 Kees Cook <keescook@chromium.org> - 2017-07-05 23:50 +0200
csiph-web