Offering: HULK hulk inclusion category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9HVTH CVE: CVE-2024-26921
--------------------------------
Fix KABI break when backport CVE-2024-26921 patch by reverting modification of struct sk_buff.
Fixes: 18685451fc4e ("inet: inet_defrag: prevent sk release while still in use") Signed-off-by: Ziyang Xuan william.xuanziyang@huawei.com --- include/linux/skbuff.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index a2f7293ba012..c3c89b6cc42f 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -622,6 +622,8 @@ typedef unsigned char *sk_buff_data_t; * @rbnode: RB tree node, alternative to next/prev for netem/tcp * @list: queue head * @sk: Socket we are owned by + * @ip_defrag_offset: (aka @sk) alternate use of @sk, used in + * fragmentation management * @dev: Device we arrived on/are leaving by * @dev_scratch: (aka @dev) alternate use of @dev when @dev would be %NULL * @cb: Control buffer. Free for use by every layer. Put private vars here @@ -737,7 +739,10 @@ struct sk_buff { struct llist_node ll_node; };
- struct sock *sk; + union { + struct sock *sk; + int ip_defrag_offset; + };
union { ktime_t tstamp;