diff --git a/backport-fix-undefined-shift-in-put_res_rec.patch b/backport-fix-undefined-shift-in-put_res_rec.patch new file mode 100644 index 0000000000000000000000000000000000000000..8772d6b00d99b7263c321c3e2a35ca9751f897b2 --- /dev/null +++ b/backport-fix-undefined-shift-in-put_res_rec.patch @@ -0,0 +1,35 @@ +From 14f56750fcf51a1d6daa14da08b34eb789241a23 Mon Sep 17 00:00:00 2001 +From: eaglegai +Date: Thu, 28 Oct 2021 21:51:13 +0800 +Subject: [PATCH] fix undefined-shift in put_res_rec +fuzz error: + ../../source3/libsmb/nmblib.c:451:4: runtime error: left shift of 65312 by 16 + places cannot be represented in type 'int' + +Author: eaglegai + +Signed-off-by: eaglegai +Reviewed-by: Jeremy Allison +Reviewed-by: Douglas Bagnall + +Autobuild-User(master): Jeremy Allison +Autobuild-Date(master): Fri Oct 29 20:29:26 UTC 2021 on sn-devel-184 +--- + source3/libsmb/nmblib.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/source3/libsmb/nmblib.c b/source3/libsmb/nmblib.c +index ff009092bbf..607470f7e4e 100644 +--- a/source3/libsmb/nmblib.c ++++ b/source3/libsmb/nmblib.c +@@ -449,7 +449,7 @@ static int put_res_rec(char *buf, size_t buflen, int offset,struct res_rec *recs + if (buf) { + RSSVAL(buf,offset,recs[i].rr_type); + RSSVAL(buf,offset+2,recs[i].rr_class); +- RSIVAL(buf,offset+4,recs[i].ttl); ++ RSIVAL(buf,offset+4,(unsigned int)recs[i].ttl); + RSSVAL(buf,offset+8,recs[i].rdlength); + memcpy(buf+offset+10,recs[i].rdata,recs[i].rdlength); + } +-- +GitLab diff --git a/samba.spec b/samba.spec index 6c0551dfc53684f6f41fccd38555f113f3fb9126..db56458676bdfb5a4319f7ceb74a5ea4f451ad23 100644 --- a/samba.spec +++ b/samba.spec @@ -49,7 +49,7 @@ Name: samba Version: 4.12.5 -Release: 8 +Release: 9 Summary: A suite for Linux to interoperate with Windows License: GPLv3+ and LGPLv3+ @@ -86,6 +86,7 @@ Patch16: backport-lib-ldb-Limit-depth-of-ldb_parse_tree.patch Patch17: backport-witness-idl-fix-length-calculation-for-witness_IPaddrInfoList.patch Patch18: backport-lzxpress-avoid-technically-undefined-shift.patch Patch19: backport-utils-asn1-avoid-undefined-behaviour.patch +Patch20: backport-fix-undefined-shift-in-put_res_rec.patch BuildRequires: avahi-devel bison cups-devel dbus-devel docbook-style-xsl e2fsprogs-devel flex gawk gnupg2 gnutls-devel >= 3.4.7 gpgme-devel BuildRequires: jansson-devel krb5-devel >= %{required_mit_krb5} libacl-devel libaio-devel libarchive-devel libattr-devel @@ -3220,6 +3221,12 @@ fi %endif %changelog +* Fri Nov 05 2021 gaihuiying - 4.12.5-9 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:fix undefined shift in put_res_rec + * Fri Oct 29 2021 gaihuiying - 4.12.5-8 - Type:bugfix - ID:NA