Linux-audit Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: Kangkook Jee <aixer77@gmail.com>
Cc: linux-audit@redhat.com
Subject: Re: auditd reports port number '0' for connect() system call
Date: Thu, 31 Mar 2016 17:50:23 -0400	[thread overview]
Message-ID: <2356527.JVHcORIXqi@x2> (raw)
In-Reply-To: <AE5F3C07-3DA7-4DD9-9B9D-7807518DB4A6@gmail.com>

On Thursday, March 31, 2016 08:54:30 AM Kangkook Jee wrote:
> but, last three one didn’t 
> 
> $ ~/bin/sock_decode 0200000036447A640000000000000000
> 0200000036447A640000000000000000: sa_family: 2 addr: 1685734454, port: 0 (0)
> $ ~/bin/sock_decode 020000003644ECD00000000000000000
> 020000003644ECD00000000000000000: sa_family: 2 addr: 3505144886, port: 0 (0)
> $ ~/bin/sock_decode 02000000369520250000000000000000
> 02000000369520250000000000000000: sa_family: 2 addr: 622892342, port: 0 (0)
> 
> Would you check this out?

You didn't give the events, but rather the sockaddr field alone. Port 0 is 
valid in some uses. It mean give me an ephemeral port.

http://lxr.free-electrons.com/source/net/ipv4/inet_connection_sock.c#L90

 90 /* Obtain a reference to a local port for the given sock,
 91  * if snum is zero it means select any available local port.

-Steve

--
Linux-audit mailing list
Linux-audit@redhat.com
https://www.redhat.com/mailman/listinfo/linux-audit

  reply	other threads:[~2016-03-31 21:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-30  3:19 auditd reports port number '0' for connect() system call Kangkook Jee
2016-03-30 23:29 ` Steve Grubb
2016-03-31 11:33   ` Kangkook Jee
2016-03-31 12:54   ` Kangkook Jee
2016-03-31 21:50     ` Steve Grubb [this message]
2016-03-31 22:11       ` Kangkook Jee
2016-04-01 12:13         ` Steve Grubb
2016-04-04 18:32           ` Kangkook Jee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2356527.JVHcORIXqi@x2 \
    --to=sgrubb@redhat.com \
    --cc=aixer77@gmail.com \
    --cc=linux-audit@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox