Decorate in6_clearscope() with __noubsan
sys/netinet6/scope6.c:480:6, member access within misaligned address 0xffff9457bc441286 for type 'struct in6_addr' which requires 4 byte alignment This issue is caused by accessing non-__packed struct in __packed. This is a[always?] false-positive reported by the sanitizer and there is no clear non-invasive approach to handle this, without changing ABI of long term existing code. Reported-by: syzbot+b53a9bcf030288081e65@syzkaller.appspotmail.com
This commit is contained in:
parent
0cbecf0304
commit
a5df2084c7
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: scope6.c,v 1.20 2018/05/01 07:21:39 maxv Exp $ */
|
||||
/* $NetBSD: scope6.c,v 1.21 2019/09/20 14:53:24 kamil Exp $ */
|
||||
/* $KAME$ */
|
||||
|
||||
/*
|
||||
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: scope6.c,v 1.20 2018/05/01 07:21:39 maxv Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: scope6.c,v 1.21 2019/09/20 14:53:24 kamil Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/malloc.h>
|
||||
|
@ -472,6 +472,7 @@ in6_getscopename(const struct in6_addr *addr)
|
|||
* Just clear the embedded scope identifier. Return 0 if the original address
|
||||
* is intact; return non 0 if the address is modified.
|
||||
*/
|
||||
__noubsan
|
||||
int
|
||||
in6_clearscope(struct in6_addr *in6)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue