diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2024-04-11 15:08:19 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2024-04-11 15:08:19 +0000 |
commit | 25ea1fd7ad09fb44f94ca5ff77b38b9c96f19899 (patch) | |
tree | 544b0e6e4e11ba698c062e78445d5fa35cd0603d /sys | |
parent | 9df29cf8e9bbd3e461b7faed2fd2fdb551a0bf4f (diff) |
Prevent changing interface loopback flag from userland.
IFF_LOOPBACK is telling userland the behaviour of a specific driver,
it is supposed to be static and permanent. Clearing the loopback
flag on lo0 could lead to a kernel crash due to inconsistent multicast
igmp group.
Reported-by: syzbot+2f24ed6c8ddb2d6bb22c@syzkaller.appspotmail.com
OK claudio@ deraadt@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/if.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if.h b/sys/net/if.h index c32a15ed0e9..ae50958ee5a 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if.h,v 1.215 2023/11/11 14:24:03 bluhm Exp $ */ +/* $OpenBSD: if.h,v 1.216 2024/04/11 15:08:18 bluhm Exp $ */ /* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */ /* @@ -219,7 +219,7 @@ struct if_status_description { /* flags set internally only: */ #define IFF_CANTCHANGE \ - (IFF_BROADCAST|IFF_POINTOPOINT|IFF_RUNNING|IFF_OACTIVE|\ + (IFF_BROADCAST|IFF_LOOPBACK|IFF_POINTOPOINT|IFF_RUNNING|IFF_OACTIVE|\ IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI) #define IFXF_MPSAFE 0x1 /* [I] if_start is mpsafe */ |