All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Sowden <jeremy@azazel.net>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Robert O'Brien <robrien@foxtrot-research.com>,
	netfilter-devel@vger.kernel.org
Subject: Re: PATCH ulogd2 filter BASE ARP packet IP addresses
Date: Wed, 23 Nov 2022 20:14:44 +0000	[thread overview]
Message-ID: <Y35/NEI+wqK06zv0@azazel.net> (raw)
In-Reply-To: <Y3wBIqCFTAFob4/4@azazel.net>

[-- Attachment #1: Type: text/plain, Size: 1424 bytes --]

On 2022-11-21, at 22:52:18 +0000, Jeremy Sowden wrote:
> On 2022-11-14, at 19:12:58 +0100, Pablo Neira Ayuso wrote:
> > On Mon, Nov 14, 2022 at 12:47:52PM -0500, Robert O'Brien wrote:
> > > I will create a bug report and attach an example ulogd
> > > configuration file that demonstrates the issue.
> >
> > OK.
> >
> > > I will send a patch using git send-email and mention it in my bug
> > > report. What is the email address to where I should send the
> > > patch?
> >
> > Please use netfilter-devel@vger.kernel.org so patchwork catches this
> > patch.
>
> I think there are at least a couple more places where IP addresses are
> not correctly handled:
>
>   https://git.netfilter.org/ulogd2/tree/output/sqlite3/ulogd_output_SQLITE3.c?h=ulogd-2.0.8&id=79aa980f2df9dda0c097e8f883a62f414b9e5138#n176
>   https://git.netfilter.org/ulogd2/tree/filter/raw2packet/ulogd_raw2packet_BASE.c?h=ulogd-2.0.8&id=79aa980f2df9dda0c097e8f883a62f414b9e5138#n647
>
> I'll see if I can find any others.

Didn't find any other endianness bugs, but there are assumptions in some
of the output plug-ins that all `ULOGD_RET_IPADDR` values are IPv4
addresses that can be treated as uint32_t values, which is not valid.
One possibility would be to handle all IP addresses internally as in
IPv6 format (i.e., convert IPv4 addresses to `::ffff:w.x.y.z` -- this is
what the IP2BIN filter does) and then convert the IPv4 addresses back on
output.

J.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2022-11-23 20:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <004301d8f531$bb2c60c0$31852240$@foxtrot-research.com>
2022-11-10 18:28 ` PATCH ulogd2 filter BASE ARP packet IP addresses Robert O'Brien
2022-11-11 11:09   ` Pablo Neira Ayuso
2022-11-14 17:47     ` Robert O'Brien
2022-11-14 18:12       ` Pablo Neira Ayuso
2022-11-21 22:52         ` Jeremy Sowden
2022-11-23 20:14           ` Jeremy Sowden [this message]

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=Y35/NEI+wqK06zv0@azazel.net \
    --to=jeremy@azazel.net \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=robrien@foxtrot-research.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.