public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Luigi Leonardi <leonardi@redhat.com>
To: sgarzare@redhat.com, stefanha@redhat.com, netdev@vger.kernel.org
Subject: Re: [PATCH iproute2] ss: fix vsock port filter
Date: Tue, 21 Apr 2026 16:01:27 +0200	[thread overview]
Message-ID: <aeeC7CtI6zw-XZgS@leonardi-redhat> (raw)
In-Reply-To: <20260421-fix_vsock-v1-1-812c80a76c1a@redhat.com>

On Tue, Apr 21, 2026 at 02:35:12PM +0200, Luigi Leonardi wrote:
>parse_hostcond() uses get_u32() to parse the vsock port into the
>aafilter.port field, which is a long. On 64-bit systems, get_u32()
>only writes the lower 32 bits, leaving the upper 32 bits set from
>the -1 initialization. This causes the port comparison
>"a->port != s->rport" in run_ssfilter() to always fail, since the
>corrupted long value never matches the int rport.
>
>Fix by using get_long() instead, consistent with how AF_PACKET and
>AF_NETLINK handle the same field.
>
>Fixes: c759116a0b2b ("ss: add AF_VSOCK support")
>Signed-off-by: Luigi Leonardi <leonardi@redhat.com>
>---

Apparently this fixes `sport` but breaks `dport` filtering.
Will send a v2. Please ignore this patch.

Luigi


  reply	other threads:[~2026-04-21 14:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-21 12:35 [PATCH iproute2] ss: fix vsock port filter Luigi Leonardi
2026-04-21 14:01 ` Luigi Leonardi [this message]
2026-04-21 14:07 ` Stefano Garzarella
2026-04-21 16:03   ` Luigi Leonardi

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=aeeC7CtI6zw-XZgS@leonardi-redhat \
    --to=leonardi@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=sgarzare@redhat.com \
    --cc=stefanha@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