Unverified Commit 21668314 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!6641 CVE-2024-26863

Merge Pull Request from: @ci-robot 
 
PR sync from: Liu Jian <liujian56@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/2DB2L7JGRO5B7BMKFR4UX7WABPO3Y6US/ 
CVE-2024-26863

Murali Karicheri (1):
  net: hsr: fix placement of logical operator in a multi-line statement

Shigeru Yoshida (1):
  hsr: Fix uninit-value access in hsr_get_node()


-- 
2.34.1
 
https://gitee.com/src-openeuler/kernel/issues/I9HJXK 
 
Link:https://gitee.com/openeuler/kernel/pulls/6641

 

Reviewed-by: default avatarYue Haibing <yuehaibing@huawei.com>
Reviewed-by: default avatarLiu YongQiang <liuyongqiang13@huawei.com>
Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
parents c51656e8 a75e2e36
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -63,8 +63,8 @@ static bool is_supervision_frame(struct hsr_priv *hsr, struct sk_buff *skb)
		return false;

	/* Correct ether type?. */
	if (!(ethHdr->h_proto == htons(ETH_P_PRP)
			|| ethHdr->h_proto == htons(ETH_P_HSR)))
	if (!(ethHdr->h_proto == htons(ETH_P_PRP) ||
	      ethHdr->h_proto == htons(ETH_P_HSR)))
		return false;

	/* Get the supervision header from correct location. */
@@ -335,8 +335,8 @@ static int hsr_fill_frame_info(struct hsr_frame_info *frame,
		/* FIXME: */
		WARN_ONCE(1, "HSR: VLAN not yet supported");
	}
	if (ethhdr->h_proto == htons(ETH_P_PRP)
			|| ethhdr->h_proto == htons(ETH_P_HSR)) {
	if (ethhdr->h_proto == htons(ETH_P_PRP) ||
	    ethhdr->h_proto == htons(ETH_P_HSR)) {
		frame->skb_std = NULL;
		frame->skb_hsr = skb;
		frame->sequence_nr = hsr_get_skb_sequence_nr(skb);
+6 −2
Original line number Diff line number Diff line
@@ -192,8 +192,12 @@ struct hsr_node *hsr_get_node(struct hsr_port *port, struct sk_buff *skb,

	/* Everyone may create a node entry, connected node to a HSR device. */

	if (ethhdr->h_proto == htons(ETH_P_PRP)
			|| ethhdr->h_proto == htons(ETH_P_HSR)) {
	if (ethhdr->h_proto == htons(ETH_P_PRP) ||
	    ethhdr->h_proto == htons(ETH_P_HSR)) {
		/* Check if skb contains hsr_ethhdr */
		if (skb->mac_len < sizeof(struct hsr_ethhdr))
			return NULL;

		/* Use the existing sequence_nr from the tag as starting point
		 * for filtering duplicate frames.
		 */