From af90e68623c729d0e3b06a1e838c5584d2d8b7c2 Mon Sep 17 00:00:00 2001 From: Andrei Vagin Date: Fri, 9 Aug 2019 22:33:40 -0700 Subject: netlink: return an error in nlmsgerr Now if a process sends an unsupported netlink requests, an error is returned from the send system call. The linux kernel works differently in this case. It returns errors in the nlmsgerr netlink message. Reported-by: syzbot+571d99510c6f935202da@syzkaller.appspotmail.com PiperOrigin-RevId: 262690453 --- pkg/abi/linux/netlink.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pkg/abi') diff --git a/pkg/abi/linux/netlink.go b/pkg/abi/linux/netlink.go index e8b6544b4..0ba086c76 100644 --- a/pkg/abi/linux/netlink.go +++ b/pkg/abi/linux/netlink.go @@ -122,3 +122,9 @@ const ( NETLINK_EXT_ACK = 11 NETLINK_DUMP_STRICT_CHK = 12 ) + +// NetlinkErrorMessage is struct nlmsgerr, from uapi/linux/netlink.h. +type NetlinkErrorMessage struct { + Error int32 + Header NetlinkMessageHeader +} -- cgit v1.2.3