Gentoo Archives: gentoo-commits

From: Sam Jorna <wraeth@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-firewall/nftables/, net-firewall/nftables/files/
Date: Mon, 11 Jul 2016 07:35:54
Message-Id: 1468222524.43c988c13be72ad3b4444b9fcd96b4377743ced9.wraeth@gentoo
1 commit: 43c988c13be72ad3b4444b9fcd96b4377743ced9
2 Author: Nicholas Vinson <nvinson234 <AT> gmail <DOT> com>
3 AuthorDate: Sun Jul 10 22:07:00 2016 +0000
4 Commit: Sam Jorna <wraeth <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 11 07:35:24 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43c988c1
7
8 net-firewall/nftables: backport null payload desc fix
9
10 nftables-0.6 handling of payload context descriptions was changed from
11 version 0.5. This change causes the code to segfault when the desc
12 variable in payload_expr_pctx_update() is set to null. The issue
13 appears to be fixed with upstream commit
14 3503738f77cdbe521da1054a37f59ac2e442b4cf. Therefore, backporting that
15 commit to 0.6 to fix this issue.
16
17 Gentoo-bug: 588192
18 Package-Manager: portage-2.3.0
19 Closes: https://github.com/gentoo/gentoo/pull/1865
20
21 .../files/nftables-0.6-null-payload-desc-fix.patch | 14 ++++++++++++++
22 .../{nftables-0.6-r1.ebuild => nftables-0.6-r2.ebuild} | 5 ++++-
23 2 files changed, 18 insertions(+), 1 deletion(-)
24
25 diff --git a/net-firewall/nftables/files/nftables-0.6-null-payload-desc-fix.patch b/net-firewall/nftables/files/nftables-0.6-null-payload-desc-fix.patch
26 new file mode 100644
27 index 0000000..3ea59e7
28 --- /dev/null
29 +++ b/net-firewall/nftables/files/nftables-0.6-null-payload-desc-fix.patch
30 @@ -0,0 +1,14 @@
31 +diff --git a/src/payload.c b/src/payload.c
32 +index ac0e917..9ba980a 100644
33 +--- a/src/payload.c
34 ++++ b/src/payload.c
35 +@@ -85,6 +85,9 @@ static void payload_expr_pctx_update(struct proto_ctx *ctx,
36 + base = ctx->protocol[left->payload.base].desc;
37 + desc = proto_find_upper(base, proto);
38 +
39 ++ if (!desc)
40 ++ return;
41 ++
42 + assert(desc->base <= PROTO_BASE_MAX);
43 + if (desc->base == base->base) {
44 + assert(base->length > 0);
45
46 diff --git a/net-firewall/nftables/nftables-0.6-r1.ebuild b/net-firewall/nftables/nftables-0.6-r2.ebuild
47 similarity index 95%
48 rename from net-firewall/nftables/nftables-0.6-r1.ebuild
49 rename to net-firewall/nftables/nftables-0.6-r2.ebuild
50 index 550c6da..7874baf 100644
51 --- a/net-firewall/nftables/nftables-0.6-r1.ebuild
52 +++ b/net-firewall/nftables/nftables-0.6-r2.ebuild
53 @@ -28,7 +28,10 @@ DEPEND="${RDEPEND}
54
55 S="${WORKDIR}/v${PV}"
56
57 -PATCHES=( "${FILESDIR}/${PN}-0.5-pdf-doc.patch" )
58 +PATCHES=(
59 + "${FILESDIR}/${PN}-0.5-pdf-doc.patch"
60 + "${FILESDIR}/${P}-null-payload-desc-fix.patch"
61 +)
62
63 pkg_setup() {
64 if kernel_is ge 3 13; then