Skip to content

Commit d244380

Browse files
committed
netfilter: nfnetlink_log: use proper helper for fetching physinif
jira LE-3201 cve CVE-2024-35839 Rebuild_History Non-Buildable kernel-rt-4.18.0-553.27.1.rt7.368.el8_10 commit-author Pavel Tikhomirov <[email protected]> commit c3f9fd5 We don't use physindev in __build_packet_message except for getting physinif from it. So let's switch to nf_bridge_get_physinif to get what we want directly. Signed-off-by: Pavel Tikhomirov <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]> (cherry picked from commit c3f9fd5) Signed-off-by: Jonathan Maple <[email protected]>
1 parent 2439f1f commit d244380

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

net/netfilter/nfnetlink_log.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -450,18 +450,18 @@ __build_packet_message(struct nfnl_log_net *log,
450450
htonl(br_port_get_rcu(indev)->br->dev->ifindex)))
451451
goto nla_put_failure;
452452
} else {
453-
struct net_device *physindev;
453+
int physinif;
454454

455455
/* Case 2: indev is bridge group, we need to look for
456456
* physical device (when called from ipv4) */
457457
if (nla_put_be32(inst->skb, NFULA_IFINDEX_INDEV,
458458
htonl(indev->ifindex)))
459459
goto nla_put_failure;
460460

461-
physindev = nf_bridge_get_physindev(skb);
462-
if (physindev &&
461+
physinif = nf_bridge_get_physinif(skb);
462+
if (physinif &&
463463
nla_put_be32(inst->skb, NFULA_IFINDEX_PHYSINDEV,
464-
htonl(physindev->ifindex)))
464+
htonl(physinif)))
465465
goto nla_put_failure;
466466
}
467467
#endif

0 commit comments

Comments
 (0)