summaryrefslogtreecommitdiff
path: root/rust/kernel
diff options
context:
space:
mode:
authorShubham Antil <shubham@octane.security>2026-10-07 13:28:07 +0530
committerSteffen Klassert <steffen.klassert@secunet.com>2026-10-12 10:40:31 +0200
commite35a12dffd5da67b6ca12bd23eebdd0570592205 (patch)
tree7f6d329788bf8f023b8763c9f3464c6aa881ccf1 /rust/kernel
parent86de3a1118a16dbbbe5fabe9aa20ffb93c072ed5 (diff)
xfrm: zero-initialise km_event in the replay-notify path
xfrm_replay_notify(), xfrm_replay_notify_bmp() and xfrm_replay_notify_esn() declare a struct km_event on the stack and initialise only its .event and .data.aevent fields, leaving .seq and .portid uninitialised. build_aevent() then builds the XFRM_MSG_NEWAE message with those fields: nlmsg_put(skb, c->portid, c->seq, ...) so the netlink header of a replay event carries uninitialised stack values rather than defined ones. This was confirmed at runtime rather than by inspection alone: the .seq and .portid carried in that header hold values that nothing in the replay path assigns. The request-driven paths set these header fields from the requester (xfrm_get_ae() / xfrm_new_ae()); only the kernel-originated replay path leaves them unset. Zero-initialise the event so the header fields are 0, the correct value for a kernel-originated notification. Fixes: f8cd54884e67 ("[IPSEC]: Sync series - core changes") Reported-by: Giovanni Vignone <gio@octane.security> Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Shubham Antil <shubham@octane.security> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'rust/kernel')
0 files changed, 0 insertions, 0 deletions