diff --git a/bluez-5.54-sw.patch b/bluez-5.54-sw.patch new file mode 100644 index 0000000000000000000000000000000000000000..8d4bdb9b9db223406a71bb8bbb7cd4934cdd39af --- /dev/null +++ b/bluez-5.54-sw.patch @@ -0,0 +1,25 @@ +diff -Nuar bluez-5.54/ell/missing.h bluez-5.54-sw/ell/missing.h +--- bluez-5.54/ell/missing.h 2019-04-03 17:49:21.000000000 +0000 ++++ bluez-5.54-sw/ell/missing.h 2022-07-20 13:43:50.420000000 +0000 +@@ -27,6 +27,8 @@ + # define __NR_getrandom 318 + # elif defined(__i386__) + # define __NR_getrandom 355 ++# elif defined(__sw_64__) ++# define __NR_getrandom 511 + # elif defined(__arm__) + # define __NR_getrandom 384 + # elif defined(__aarch64__) +diff -Nuar bluez-5.54/profiles/network/bnep.c bluez-5.54-sw/profiles/network/bnep.c +--- bluez-5.54/profiles/network/bnep.c 2019-09-19 18:51:03.000000000 +0000 ++++ bluez-5.54-sw/profiles/network/bnep.c 2022-07-20 13:58:58.390000000 +0000 +@@ -268,7 +268,8 @@ + + memset(&timeo, 0, sizeof(timeo)); + timeo.tv_sec = 0; +- setsockopt(sk, SOL_SOCKET, SO_RCVTIMEO, &timeo, sizeof(timeo)); ++/* setsockopt(sk, SOL_SOCKET, SO_RCVTIMEO, &timeo, sizeof(timeo)); */ ++ setsockopt(sk, SOL_SOCKET, SO_RCVTIMEO_OLD, &timeo, sizeof(timeo)); + + sk = g_io_channel_unix_get_fd(session->io); + if (bnep_connadd(sk, session->src, session->iface) < 0) diff --git a/bluez.spec b/bluez.spec index 68b49c7038951d48e4114423a5bb39bdb98586b3..d9450bca7f32d6b9b364b362a87f570f888a862a 100644 --- a/bluez.spec +++ b/bluez.spec @@ -1,7 +1,7 @@ Name: bluez Summary: Bluetooth utilities Version: 5.54 -Release: 15 +Release: 16 License: GPLv2+ URL: http://www.bluez.org/ Source0: http://www.kernel.org/pub/linux/bluetooth/bluez-%{version}.tar.xz @@ -34,6 +34,9 @@ Patch6009: backport-CVE-2021-41229.patch Patch6010: backport-CVE-2022-39176.patch Patch6011: backport-0001-CVE-2022-39177.patch Patch6012: backport-0002-CVE-2022-39177.patch +%ifarch sw_64 +Patch6013: bluez-5.54-sw.patch +%endif BuildRequires: dbus-devel >= 1.6 libell-devel >= 0.28 autoconf BuildRequires: glib2-devel libical-devel readline-devel @@ -190,6 +193,9 @@ make check %{_mandir}/man8/* %changelog +* Thu Dec 08 2022 zhangzhixin - 5.54-16 +- add sw64 patch + * Wed Sep 07 2022 wangkerong - 5.54-15 - DESC:fix CVE-2022-39176,CVE-2022-39177