* [lnf-queue PATCH] nlmsg: add lacking attributes validation
@ 2015-09-11 1:54 Ken-ichirou MATSUZAWA
2015-10-05 15:36 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Ken-ichirou MATSUZAWA @ 2015-09-11 1:54 UTC (permalink / raw)
To: The netfilter developer mailinglist
This patch adds four (actually two) attributes validation with
comparing to current kernel header.
Signed-off-by: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp>
---
src/nlmsg.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/nlmsg.c b/src/nlmsg.c
index cabd8be..ba28c77 100644
--- a/src/nlmsg.c
+++ b/src/nlmsg.c
@@ -140,6 +140,7 @@ static int nfq_pkt_parse_attr_cb(const struct nlattr *attr, void *data)
case NFQA_SECCTX:
case NFQA_UID:
case NFQA_GID:
+ case NFQA_CT_INFO:
if (mnl_attr_validate(attr, MNL_TYPE_U32) < 0)
return MNL_CB_ERROR;
break;
@@ -155,7 +156,15 @@ static int nfq_pkt_parse_attr_cb(const struct nlattr *attr, void *data)
return MNL_CB_ERROR;
}
break;
+ case NFQA_PACKET_HDR:
+ if (mnl_attr_validate2(attr, MNL_TYPE_UNSPEC,
+ sizeof(struct nfqnl_msg_packet_hdr)) < 0) {
+ return MNL_CB_ERROR;
+ }
+ break;
case NFQA_PAYLOAD:
+ case NFQA_CT:
+ case NFQA_EXP:
break;
}
tb[type] = attr;
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [lnf-queue PATCH] nlmsg: add lacking attributes validation
2015-09-11 1:54 [lnf-queue PATCH] nlmsg: add lacking attributes validation Ken-ichirou MATSUZAWA
@ 2015-10-05 15:36 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2015-10-05 15:36 UTC (permalink / raw)
To: Ken-ichirou MATSUZAWA; +Cc: The netfilter developer mailinglist
On Fri, Sep 11, 2015 at 10:54:53AM +0900, Ken-ichirou MATSUZAWA wrote:
> This patch adds four (actually two) attributes validation with
> comparing to current kernel header.
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-05 15:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-11 1:54 [lnf-queue PATCH] nlmsg: add lacking attributes validation Ken-ichirou MATSUZAWA
2015-10-05 15:36 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).