mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-07 09:58:54 +00:00
audit: Ignore operations on PF_NETLINK sockets
This commit is contained in:
parent
8829c9f0de
commit
4a478f1ea1
@ -157,11 +157,16 @@ Status SocketEventSubscriber::ProcessEvents(
|
||||
|
||||
std::string saddr;
|
||||
GetStringFieldFromMap(saddr, sockaddr_event_record->fields, "saddr");
|
||||
if (saddr.size() < 4 || saddr[0] == '1') {
|
||||
if (saddr.size() < 4) {
|
||||
VLOG(1) << "Invalid saddr field in AUDIT_SOCKADDR: \"" << saddr << "\"";
|
||||
continue;
|
||||
}
|
||||
|
||||
// skip operations on NETLINK_ROUTE sockets
|
||||
if (saddr[0] == '1' && saddr[1] == '0') {
|
||||
continue;
|
||||
}
|
||||
|
||||
CopyFieldFromMap(row, syscall_event_record->fields, "auid");
|
||||
CopyFieldFromMap(row, syscall_event_record->fields, "pid");
|
||||
GetStringFieldFromMap(row["fd"], syscall_event_record->fields, "a0");
|
||||
@ -180,7 +185,8 @@ Status SocketEventSubscriber::ProcessEvents(
|
||||
bool unix_socket;
|
||||
if (!parseSockAddr(saddr, row, unix_socket)) {
|
||||
VLOG(1) << "Malformed syscall event. The saddr field in the "
|
||||
"AUDIT_SOCKADDR record could not be parsed";
|
||||
"AUDIT_SOCKADDR record could not be parsed: \""
|
||||
<< saddr << "\"";
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ namespace osquery {
|
||||
|
||||
FLAG(bool,
|
||||
audit_allow_user_events,
|
||||
false,
|
||||
true,
|
||||
"Allow the audit publisher to install user events-related rules");
|
||||
|
||||
// Depend on the external getUptime table method.
|
||||
|
Loading…
Reference in New Issue
Block a user