Thread View: linux.kernel.netdev
1 messages
1 total messages
Started by Florian Westphal
Mon, 16 Nov 2026 19:15
Re: [PATCH] netfilter: nfnetlink_log: fix config error handling, SIT headroom OOB read, and nlmsg rollback
Author: Florian Westphal
Date: Mon, 16 Nov 2026 19:15
Date: Mon, 16 Nov 2026 19:15
40 lines
8470 bytes
8470 bytes
Hui Peng <benquike@gmail.com> wrote:
> Fix three issues in net/netfilter/nfnetlink_log.c:
>
> 1. In __build_packet_message(), subtracting ETH_HLEN from skb_mac_header()
> for ARPHRD_SIT tunnels can read before skb->head or past
> skb_tail_pointer(skb), and nla_put_failure returns -1 without calling
> nlmsg_cancel(inst->skb, nlh). Remove the unsafe ETH_HLEN subtraction,
That made no sense to me. The entire ARPHRD_SIT check is dead code
nowadays and it will be removed in -next.
But how is it 'unsafe'? If it moves to before skb->head, no read will
occur.
> verify hwhdrp + hard_header_len <= skb_tail_pointer(skb), and cancel
> the partial nlmsg on error.
I don't think its expected to ever fail. There is a space-remaining
check *before* __build_packet_message() is called.
> 2. In nfulnl_log_packet(), only increment inst->qlen after
> __build_packet_message() succeeds.
See above.
> 3. In nfulnl_recv_config(), propagate errors from nfulnl_set_mode() and
> nfulnl_set_nlbufsiz() and destroy the newly created instance if
> NFULNL_CFG_CMD_BIND was processed in the same message.
Not sure about this. Could cause existing (working!) userspace
to fail.
> Fixes: 0c36b48b36dc ("netfilter: nfnetlink_log: fix mac address for 6in4 tunnels")
Not really. Most of these 'fixes' are day-0 bugs.
I suggest we wait for the ARPHRD_SIT removal series to land in nf-next.
Then at least some of the changes here could land as cleanups.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads