lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070321122517.GT521@postel.suug.ch>
Date:	Wed, 21 Mar 2007 13:25:17 +0100
From:	Thomas Graf <tgraf@...g.ch>
To:	Patrick McHardy <kaber@...sh.net>
Cc:	davem@...emloft.net, netdev@...r.kernel.org,
	Netfilter Development Mailinglist 
	<netfilter-devel@...ts.netfilter.org>
Subject: Re: [PATCH 5/5] [NETLINK]: Ignore control messages directly in netlink_run_queue()

* Patrick McHardy <kaber@...sh.net> 2007-03-21 13:06
> Thomas Graf wrote:
> > * Patrick McHardy <kaber@...sh.net> 2007-03-21 05:44
> > 
> >>This looks like it would break nfnetlink, which appears to be
> >>using 0 as smallest message type.
> > 
> > 
> > It shouldn't do that, the first 16 message types are reserved
> > for control messages.
> 
> 
> I'm afraid it does:
> 
> enum cntl_msg_types {
>         IPCTNL_MSG_CT_NEW,
>         IPCTNL_MSG_CT_GET,
>         IPCTNL_MSG_CT_DELETE,
>         IPCTNL_MSG_CT_GET_CTRZERO,
>         IPCTNL_MSG_MAX
> };
> 
> This is totally broken of course since it also uses netlink_ack(),
> netlink_dump() etc. :( Any smart ideas how to fix this without
> breaking compatibility?

Hmm... I think nfnetlink isn't even broken:

/* netfilter netlink message types are split in two pieces:
 * 8 bit subsystem, 8bit operation.
 */

#define NFNL_SUBSYS_ID(x)	((x & 0xff00) >> 8)
#define NFNL_MSG_TYPE(x)	(x & 0x00ff)

/* No enum here, otherwise __stringify() trick of
 * MODULE_ALIAS_NFNL_SUBSYS()
 * won't work anymore */
#define NFNL_SUBSYS_NONE 		0
#define NFNL_SUBSYS_CTNETLINK		1
#define NFNL_SUBSYS_CTNETLINK_EXP	2
#define NFNL_SUBSYS_QUEUE		3
#define NFNL_SUBSYS_ULOG		4
#define NFNL_SUBSYS_COUNT		5

A msg_type < 0x10 would just trigger a -EINVAL as no 0x0 subsystem
can ever be registered.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ