Skip to content

Commit 164aef6

Browse files
author
Herton R. Krzesinski
committed
Merge: netfilter: nft_payload: incorrect arithmetics when fetching VLAN header bits
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/1900 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2161725 Upstream Status: net commit 696e1a4 CVE: CVE-2023-0179 Signed-off-by: Florian Westphal <fwestpha@redhat.com> Approved-by: Jarod Wilson <jarod@redhat.com> Approved-by: Antoine Tenart <atenart@redhat.com> Approved-by: John B. Wyatt IV <jwyatt@redhat.com> Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
2 parents 866c805 + c3747b9 commit 164aef6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/netfilter/nft_payload.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ nft_payload_copy_vlan(u32 *d, const struct sk_buff *skb, u8 offset, u8 len)
6262
return false;
6363

6464
if (offset + len > VLAN_ETH_HLEN + vlan_hlen)
65-
ethlen -= offset + len - VLAN_ETH_HLEN + vlan_hlen;
65+
ethlen -= offset + len - VLAN_ETH_HLEN - vlan_hlen;
6666

6767
memcpy(dst_u8, vlanh + offset - vlan_hlen, ethlen);
6868

0 commit comments

Comments
 (0)