Commit d2ab07e9 authored by Ziyang Xuan's avatar Ziyang Xuan
Browse files

sk_buff: Fix KABI break for the modification of struct sk_buff

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: default avatarZiyang Xuan <william.xuanziyang@huawei.com>
parent 9f322fea
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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;
	};

	union {
		struct sock		*sk;
		int			ip_defrag_offset;
	};

	union {
		ktime_t		tstamp;