On 5/6/19 5:32 PM, Greg Kroah-Hartman wrote: > From: Andrey Ryabinin <[email protected]> > > commit c5caf21ab0cf884ef15b25af234f620e4a233139 upstream. > > In the upcoming gcc7 release, the -fsanitize=kernel-address option at > first implied new -fsanitize-address-use-after-scope option. This would > cause link errors on older kernels because they don't have two new > functions required for use-after-scope support. Therefore, gcc7 changed > default to -fno-sanitize-address-use-after-scope. > > Now the kernel has everything required for that feature since commit > 828347f8f9a5 ("kasan: support use-after-scope detection"). So, to make it > work, we just have to enable use-after-scope in CFLAGS. > > Link: > http://lkml.kernel.org/r/[email protected] > Signed-off-by: Andrey Ryabinin <[email protected]> > Acked-by: Dmitry Vyukov <[email protected]> > Cc: Alexander Potapenko <[email protected]> > Cc: Andrey Konovalov <[email protected]> > Signed-off-by: Andrew Morton <[email protected]> > Signed-off-by: Linus Torvalds <[email protected]> > Signed-off-by: Andrey Konovalov <[email protected]> > Signed-off-by: Greg Kroah-Hartman <[email protected]> > > --- > scripts/Makefile.kasan | 2 ++ > 1 file changed, 2 insertions(+) > > --- a/scripts/Makefile.kasan > +++ b/scripts/Makefile.kasan > @@ -29,6 +29,8 @@ else > endif > endif > > +CFLAGS_KASAN += $(call cc-option, -fsanitize-address-use-after-scope) > + > CFLAGS_KASAN_NOSANITIZE := -fno-builtin > > endif > > This shouldn't be in the -stable.
- [PATCH 4.9 03/62] ipv6/flowlabel: wait rcu grace period... Greg Kroah-Hartman
- [PATCH 4.9 33/62] batman-adv: Reduce tt_global hash ref... Greg Kroah-Hartman
- [PATCH 4.9 47/62] net: hns: Use NAPI_POLL_WEIGHT for hn... Greg Kroah-Hartman
- [PATCH 4.9 48/62] net: hns: Fix WARNING when remove HNS... Greg Kroah-Hartman
- [PATCH 4.9 51/62] xsysace: Fix error handling in ace_se... Greg Kroah-Hartman
- [PATCH 4.9 56/62] staging: iio: adt7316: fix the dac re... Greg Kroah-Hartman
- [PATCH 4.9 46/62] net: hns: fix KASAN: use-after-free i... Greg Kroah-Hartman
- [PATCH 4.9 57/62] staging: iio: adt7316: fix the dac wr... Greg Kroah-Hartman
- [PATCH 4.9 08/62] x86/suspend: fix false positive KASAN... Greg Kroah-Hartman
- [PATCH 4.9 09/62] kasan: turn on -fsanitize-address-use... Greg Kroah-Hartman
- Re: [PATCH 4.9 09/62] kasan: turn on -fsanitize-ad... Andrey Ryabinin
- Re: [PATCH 4.9 09/62] kasan: turn on -fsanitiz... Greg Kroah-Hartman
- Re: [PATCH 4.9 09/62] kasan: turn on -fsan... Andrey Ryabinin
- Re: [PATCH 4.9 09/62] kasan: turn on -... Greg Kroah-Hartman
- [PATCH 4.9 45/62] scsi: storvsc: Fix calculation of sub... Greg Kroah-Hartman
- [PATCH 4.9 62/62] media: v4l2: i2c: ov7670: Fix PLL byp... Greg Kroah-Hartman
- [PATCH 4.9 61/62] x86/mce: Improve error message when k... Greg Kroah-Hartman
- [PATCH 4.9 38/62] net: stmmac: fix dropping of multi-de... Greg Kroah-Hartman
- [PATCH 4.9 40/62] jffs2: fix use-after-free on symlink ... Greg Kroah-Hartman
- [PATCH 4.9 39/62] net: stmmac: dont log oversized frame... Greg Kroah-Hartman
- [PATCH 4.9 41/62] debugfs: fix use-after-free on symlin... Greg Kroah-Hartman

