From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 040D0C433F5 for ; Tue, 3 May 2022 17:16:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1651598196; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=8x+mf6FhEzWJ4+NO+kdKMeGJmFg4MJBMp+QbJSxX36k=; b=bhgZee9fNiScotCQ9llQoxy6t12FyEdsFzMB52RDRypHg4pfxMumLJ+AJlN8ZbL9RTGhFs T/W6ik/F9l7LnIlBrcAdolwAbtJtnT5R6Wry8nGxKKgQ5emQKbvNMrl/5B75QFlG9bXn6n oyudae9dh7GcV0Y+ARIXejDaluMcDJ0= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-456-2iGFz6ZgOr6Ksk6qv4nCOg-1; Tue, 03 May 2022 13:16:28 -0400 X-MC-Unique: 2iGFz6ZgOr6Ksk6qv4nCOg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 929231C05135; Tue, 3 May 2022 17:16:21 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 192251542A99; Tue, 3 May 2022 17:16:21 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id C1CAD1947049; Tue, 3 May 2022 17:16:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id BF4171947043 for ; Tue, 3 May 2022 17:16:19 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 9A8EDC28109; Tue, 3 May 2022 17:16:19 +0000 (UTC) Received: from x2.localnet (unknown [10.22.10.175]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5D29CC07F5D; Tue, 3 May 2022 17:16:19 +0000 (UTC) From: Steve Grubb To: linux-audit@redhat.com, linux-kernel@vger.kernel.org, Sven Schnelle Subject: Re: [PATCH 1/2] audit: add call argument to socketcall auditing Date: Tue, 03 May 2022 13:16:18 -0400 Message-ID: <4396517.LvFx2qVVIh@x2> Organization: Red Hat In-Reply-To: <20220503090212.1322050-1-svens@linux.ibm.com> References: <20220503090212.1322050-1-svens@linux.ibm.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 X-BeenThere: linux-audit@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Audit Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eric Paris Errors-To: linux-audit-bounces@redhat.com Sender: "Linux-audit" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=linux-audit-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello, On Tuesday, May 3, 2022 5:02:11 AM EDT Sven Schnelle wrote: > socketcall auditing misses the call argument: > > type=SOCKETCALL msg=audit: nargs=3 a0=10 a1=3 a2=c > > which renders socketcall auditing (almost) useless. Add the call > argument so it is possible to decode the actual syscall from the > audit log: > > type=SOCKETCALL msg=audit: call=1 nargs=3 a0=10 a1=3 a2=c The call argument is in arg0 in the syscall record type=PROCTITLE msg=audit(1651597634.301:1034): proctitle="./test" type=SOCKADDR msg=audit(1651597634.301:1034): saddr=020000357F0000013030303030303030 type=SOCKETCALL msg=audit(1651597634.301:1034): nargs=3 a0=3 a1=fff47510 a2=10 type=SYSCALL msg=audit(1651597634.301:1034): arch=40000003 syscall=102 success=no exit=-111 a0=3 a1=fff47520 a2=f7f306cb a3=35000002 items=0 ppid=10425 pid=10428 auid=325 uid=1325 gid=1325 euid=1325 suid=1325 fsuid=1325 egid=1325 sgid=1325 fsgid=1325 tty=pts2 ses=3 comm="test" exe="/ home/socketcall/test" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key="32bit-abi" which user space translates into: type=PROCTITLE msg=audit(05/03/2022 13:07:14.301:1034) : proctitle=./test type=SOCKADDR msg=audit(05/03/2022 13:07:14.301:1034) : saddr={ saddr_fam=inet laddr=127.0.0.1 lport=53 } type=SOCKETCALL msg=audit(05/03/2022 13:07:14.301:1034) : nargs=3 a0=0x3 a1=0xfff47510 a2=0x10 type=SYSCALL msg=audit(05/03/2022 13:07:14.301:1034) : arch=i386 syscall=socketcall(connect) success=no exit=ECONNREFUSED(Connection refused) a0=connect a1=0xfff47520 a2=0xf7f306cb a3=0x35000002 items=0 ppid=10425 pid=10428 auid=sgrubb uid=sgrubb gid=sgrubb euid=sgrubb suid=sgrubb fsuid=sgrubb egid=sgrubb sgid=sgrubb fsgid=sgrubb tty=pts2 ses=3 comm=test exe=/home/test/socketcall/test subj=unconfined_u:unconfined_r:unconfined_t:s0- s0:c0.c1023 key=32bit-abi Nothing is missing. -Steve -- Linux-audit mailing list Linux-audit@redhat.com https://listman.redhat.com/mailman/listinfo/linux-audit