recipe-kernel: cherry pick mctp kernel crash fix

Google-Bug-Id: 375482148
Tested: local build pass
Change-Id: Ic6ddf07e495e23997e45831d1b7c7d5e4bdb3063
Signed-off-by: Yuxiao Zhang <yuxiaozhang@google.com>
diff --git a/recipes-kernel/linux/5.15/0001-mctp-i2c-handle-NULL-header-address.patch b/recipes-kernel/linux/5.15/0001-mctp-i2c-handle-NULL-header-address.patch
new file mode 100644
index 0000000..fefecb8
--- /dev/null
+++ b/recipes-kernel/linux/5.15/0001-mctp-i2c-handle-NULL-header-address.patch
@@ -0,0 +1,34 @@
+From e1d8743ca279d68bb3069750282771cdd89f9046 Mon Sep 17 00:00:00 2001
+From: Matt Johnston <matt@codeconstruct.com.au>
+Date: Fri, 8 Dec 2023 16:03:53 +0800
+Subject: [PATCH] mctp i2c: handle NULL header address
+
+daddr can be NULL if there is no neighbour table entry present
+
+upstream status is pending.
+
+Google-Bug-Id: 373752794
+Reported-by: Dung Cao <dung@os.amperecomputing.com>
+Change-Id: I005c31522a9494c766799b655fbffab5b80f3fce
+Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
+---
+ drivers/net/mctp/mctp-i2c.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/drivers/net/mctp/mctp-i2c.c b/drivers/net/mctp/mctp-i2c.c
+index f3ff7c8d30c4..42fa626292b4 100644
+--- a/drivers/net/mctp/mctp-i2c.c
++++ b/drivers/net/mctp/mctp-i2c.c
+@@ -547,6 +547,9 @@ static int mctp_i2c_header_create(struct sk_buff *skb, struct net_device *dev,
+ 	if (len > MCTP_I2C_MAXMTU)
+ 		return -EMSGSIZE;
+ 
++	if (!daddr || !saddr)
++		return -EINVAL;
++
+ 	lldst = *((u8 *)daddr);
+ 	llsrc = *((u8 *)saddr);
+ 
+-- 
+2.47.0.163.g1226f6d8fa-goog
+
diff --git a/recipes-kernel/linux/linux-gbmc_5.15.bb b/recipes-kernel/linux/linux-gbmc_5.15.bb
index 2b49fb6..b81ede6 100644
--- a/recipes-kernel/linux/linux-gbmc_5.15.bb
+++ b/recipes-kernel/linux/linux-gbmc_5.15.bb
@@ -19,6 +19,7 @@
   file://0001-Add-support-for-Winbond-W25Q512NW-IQ-IN.patch \
   file://0001-hwmon-max34451-Workaround-for-lost-page.patch \
   file://0002-hwmon-max34451-Add-programming-feature.patch \
+  file://0001-mctp-i2c-handle-NULL-header-address.patch \
   "
 
 SRC_URI:append:aspeed-g6 = " \