Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1549802
| From | Michal Marek <mmarek@suse.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/3] genksyms: Fix segfault with invalid declarations |
| Date | 2017-01-03 15:20 +0100 |
| Message-ID | <sVy6t-7wM-11@gated-at.bofh.it> (permalink) |
| References | <sVy6t-7wM-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Do not try to recover too early and segfault when parsing invalid
declarations such as
echo 'int (int);' | scripts/genksyms/genksyms
echo 'int a, (int);' | scripts/genksyms/genksyms
echo 'extern void *__inline_memcpy((void *), (const void *), (__kernel_size_t));' | scripts/genksyms/genksyms
The last one was a real-life bug with
include/asm-generic/asm-prototypes.h on x86_64.
Reported-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Michal Marek <mmarek@suse.com>
---
scripts/genksyms/parse.y | 2 --
1 file changed, 2 deletions(-)
diff --git a/scripts/genksyms/parse.y b/scripts/genksyms/parse.y
index 4fba255e54ae..00a6d7e54971 100644
--- a/scripts/genksyms/parse.y
+++ b/scripts/genksyms/parse.y
@@ -322,8 +322,6 @@ direct_declarator:
{ $$ = $2; }
| '(' declarator ')'
{ $$ = $3; }
- | '(' error ')'
- { $$ = $3; }
;
/* Nested declarators differ from regular declarators in that they do
--
2.10.2
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/3] asm-prototypes: Clear any CPP defines before declaring the functions Michal Marek <mmarek@suse.com> - 2017-01-03 15:20 +0100
[PATCH 3/3] genksyms: Regenerate parser Michal Marek <mmarek@suse.com> - 2017-01-03 15:20 +0100
[PATCH 2/3] genksyms: Fix segfault with invalid declarations Michal Marek <mmarek@suse.com> - 2017-01-03 15:20 +0100
Re: [PATCH 1/3] asm-prototypes: Clear any CPP defines before declaring the functions Borislav Petkov <bp@alien8.de> - 2017-01-05 10:40 +0100
Re: [PATCH 1/3] asm-prototypes: Clear any CPP defines before declaring the functions Michal Marek <mmarek@suse.com> - 2017-01-05 13:30 +0100
csiph-web