Compare commits

...

33 Commits

Author SHA1 Message Date
openeuler-ci-bot a64a525169 !115 sync the CVE-2023-7104 from 22.03
From: @noodlesland 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2024-09-05 10:10:10 +00:00
Wang_M 347848fa14 sync the patch from 22.03 2024-09-05 04:10:05 +00:00
openeuler-ci-bot 928f32f54d !110 Bump to 3.42.0
From: @zhengzhenyu 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2024-02-29 06:06:11 +00:00
Zhenyu Zheng 56bc0cbcce Bump to 3.42.0
Bump to 3.42.0 to fix CVE-2024-0232

Signed-off-by: Zhenyu Zheng <zheng.zhenyu@outlook.com>
2024-02-28 18:11:48 +08:00
openeuler-ci-bot 418511d548 !99 fix issue CVE-2023-7104
From: @Jeremyzz 
Reviewed-by: @zwtmichael, @dillon_chen 
Signed-off-by: @dillon_chen
2024-01-04 08:26:39 +00:00
mazhao a4cd646a0c fix the CVE-2023-7104
Signed-off-by: mazhao <mazhao12@huawei.com>
2024-01-03 12:02:25 +08:00
openeuler-ci-bot 40cd9b59ce !92 fix issue CVE-2023-36191
From: @zwtmichael 
Reviewed-by: @wbq_sky, @slovezt 
Signed-off-by: @wbq_sky
2023-08-08 03:08:44 +00:00
zwtmichael d5a9995a67 fix CVE-2023-36191
Signed-off-by: zwtmichael <zhuwentao5@huawei.com>
2023-08-07 15:17:42 +08:00
openeuler-ci-bot 3b8ef70260 !86 remove fail testcase for loongarch
From: @zhangwenlong01 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2023-02-02 03:26:14 +00:00
Wenlong Zhang 29347b1527 remove fail testcase for loongarch 2023-01-14 09:38:22 +08:00
openeuler-ci-bot 36052db9a0 !83 Fix CVE-2022-46908
From: @zwtmichael 
Reviewed-by: @wbq_sky 
Signed-off-by: @wbq_sky
2022-12-16 05:05:55 +00:00
zwtmichael d5bf7b294a Fix safe mode authorizer callback to reject disallowed UDFs
Signed-off-by: zwtmichael <zhuwentao5@huawei.com>
2022-12-15 11:43:09 +08:00
openeuler-ci-bot 4255fd05db !81 [sync] PR-80: fix build problem
From: @openeuler-sync-bot 
Reviewed-by: @wbq_sky 
Signed-off-by: @wbq_sky
2022-09-15 02:00:39 +00:00
zwtmichael 8222faba44 fix build problem
Signed-off-by: zwtmichael <zhuwentao5@huawei.com>
(cherry picked from commit 4287815f16)
2022-09-14 15:44:43 +08:00
openeuler-ci-bot b6baf940d4 !71 fix integer overflow on gigabyte string
From: @zwtmichael 
Reviewed-by: @wbq_sky 
Signed-off-by: @wbq_sky
2022-09-05 09:35:02 +00:00
zwtmichael 76b8dd730a fix integer overflow on multi-gigabyte string
Signed-off-by: zwtmichael <zhuwentao5@huawei.com>
2022-09-05 16:55:54 +08:00
zwtmichael 7d7e9e3d73 update to 3.37.2
Signed-off-by: zwtmichael <zhuwentao5@huawei.com>
2022-09-05 15:36:34 +08:00
openeuler-ci-bot 7cae1352c1 !65 update to 3.37.2
From: @zwtmichael 
Reviewed-by: @wbq_sky 
Signed-off-by: @wbq_sky
2022-08-31 12:46:15 +00:00
zwtmichael d8002ef402 update to 3.37.2
Signed-off-by: zwtmichael <zhuwentao5@huawei.com>
2022-08-30 17:08:29 +08:00
openeuler-ci-bot 538587881d !60 修复 CVE-2022-35737
From: @liusirui91 
Reviewed-by: @shikemeng, @dillon_chen 
Signed-off-by: @dillon_chen
2022-08-16 04:13:35 +00:00
liusirui 419bd31973 fix CVE-2022-35737 2022-08-16 10:08:56 +08:00
openeuler-ci-bot c135d8d9cf !54 【轻量级 PR】:fix spec changelog date error
From: @jxy_git 
Reviewed-by: @bzhaoop 
Signed-off-by: @bzhaoop
2022-06-14 00:52:52 +00:00
jiangxinyu a5ad049268 fix spec changelog date error 2022-06-08 06:56:04 +00:00
openeuler-ci-bot ae04b38c7e !49 Fix the CVE-2021-36690.
From: @wbq_sky
Reviewed-by: @bzhaoop
Signed-off-by: @bzhaoop
2021-11-27 09:13:46 +00:00
wbq_sky 281ace3ce4 fix the CVE-2021-36690
Signed-off-by: wbq_sky <wangbingquan@huawei.com>
2021-11-27 14:08:25 +08:00
openeuler-ci-bot fa6537c498 !47 Update the sqlite to 3.36
From: @wbq_sky
Reviewed-by: @bzhaoop
Signed-off-by: @bzhaoop
2021-11-25 07:34:38 +00:00
wbq_sky 70773bbab5 update to 3.36.0
Signed-off-by: wbq_sky <wangbingquan@huawei.com>
2021-11-25 08:45:52 +08:00
openeuler-ci-bot 17f47bf553 !40 Fix the uninitialized value used in pattern compare function.
From: @wbq_sky
Reviewed-by: @bzhaoop
Signed-off-by: @bzhaoop
2021-09-27 12:01:15 +00:00
wbq_sky c7b6d9b65f fix the uninitialized value used in pattern match
Signed-off-by: wbq_sky <wangbingquan@huawei.com>
2021-09-26 16:28:27 +08:00
openeuler-ci-bot 80491f4558 !39 Fix a problem caused by using an SQL variable in an over clause within a trigger.
From: @wbq_sky
Reviewed-by: @bzhaoop
Signed-off-by: @bzhaoop
2021-09-13 12:28:19 +00:00
wbq_sky b5acf1da61 fix the null reference in the over clause within trigger
Signed-off-by: wbq_sky <wangbingquan@huawei.com>
2021-09-10 14:19:45 +08:00
openeuler-ci-bot 4cbaf5da18 !38 fix the problem of the infinite loop in trim function.
From: @wbq_sky
Reviewed-by: @bzhaoop
Signed-off-by: @bzhaoop
2021-09-10 02:59:56 +00:00
wbq_sky d81186e427 fix the infinite loop in the trim function while the pattern is well formed.
Signed-off-by: wbq_sky <wangbingquan@huawei.com>
2021-09-10 10:54:13 +08:00
8 changed files with 103 additions and 101 deletions
+45
View File
@@ -0,0 +1,45 @@
it From a756d158b3e55831975feb45b753ba499d2adeda Mon Sep 17 00:00:00 2001
From: mazhao <mazhao12@huawei.com>
Date: Wed, 3 Jan 2024 12:00:45 +0800
Subject: [PATCH] Fix a buffer overread in the sessions extension that could
occur when processing a corrupt changeset.
Signed-off-by: mazhao <mazhao12@huawei.com>
---
ext/session/sqlite3session.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/ext/session/sqlite3session.c b/ext/session/sqlite3session.c
index a892804..72ad427 100644
--- a/ext/session/sqlite3session.c
+++ b/ext/session/sqlite3session.c
@@ -3050,15 +3050,19 @@ static int sessionReadRecord(
}
}
if( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT ){
- sqlite3_int64 v = sessionGetI64(aVal);
- if( eType==SQLITE_INTEGER ){
- sqlite3VdbeMemSetInt64(apOut[i], v);
+ if( (pIn->nData-pIn->iNext)<8 ){
+ rc = SQLITE_CORRUPT_BKPT;
}else{
- double d;
- memcpy(&d, &v, 8);
- sqlite3VdbeMemSetDouble(apOut[i], d);
+ sqlite3_int64 v = sessionGetI64(aVal);
+ if( eType==SQLITE_INTEGER ){
+ sqlite3VdbeMemSetInt64(apOut[i], v);
+ }else{
+ double d;
+ memcpy(&d, &v, 8);
+ sqlite3VdbeMemSetDouble(apOut[i], d);
+ }
+ pIn->iNext += 8;
}
- pIn->iNext += 8;
}
}
}
--
2.34.1
-24
View File
@@ -1,24 +0,0 @@
diff -up sqlite-src-3120200/configure.ac.malloc_usable_size sqlite-src-3120200/configure.ac
--- sqlite-src-3120200/configure.ac.malloc_usable_size 2016-04-25 09:46:48.134690570 +0200
+++ sqlite-src-3120200/configure.ac 2016-04-25 09:48:41.622637181 +0200
@@ -108,7 +108,7 @@ AC_CHECK_HEADERS([sys/types.h stdlib.h s
#########
# Figure out whether or not we have these functions
#
-AC_CHECK_FUNCS([fdatasync gmtime_r isnan localtime_r localtime_s malloc_usable_size strchrnul usleep utime pread pread64 pwrite pwrite64])
+AC_CHECK_FUNCS([fdatasync gmtime_r isnan localtime_r localtime_s strchrnul usleep utime pread pread64 pwrite pwrite64])
#########
# By default, we use the amalgamation (this may be changed below...)
diff -up sqlite-src-3120200/configure.malloc_usable_size sqlite-src-3120200/configure
--- sqlite-src-3120200/configure.malloc_usable_size 2016-04-25 09:47:12.594679063 +0200
+++ sqlite-src-3120200/configure 2016-04-25 09:49:28.684615042 +0200
@@ -10275,7 +10275,7 @@ done
#########
# Figure out whether or not we have these functions
#
-for ac_func in fdatasync gmtime_r isnan localtime_r localtime_s malloc_usable_size strchrnul usleep utime pread pread64 pwrite pwrite64
+for ac_func in fdatasync gmtime_r isnan localtime_r localtime_s strchrnul usleep utime pread pread64 pwrite pwrite64
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -1,66 +0,0 @@
From defded46ea50037500590122d847ba6a7cb96110 Mon Sep 17 00:00:00 2001
From: eulerstorage <eulerstoragemt@huawei.com>
Date: Sat, 11 Jan 2020 11:33:54 +0800
Subject: [PATCH] remove fail testcase in no free fd situation
Remove testcase 1.1.1, 1.1.2 and 1.1.3, since it can not success in
some situation if there is no enough fd resource.
---
test/oserror.test | 27 ---------------------------
1 file changed, 27 deletions(-)
diff --git a/test/oserror.test b/test/oserror.test
index a51301c..d46218f 100644
--- a/test/oserror.test
+++ b/test/oserror.test
@@ -40,47 +40,6 @@ proc do_re_test {tn script expression} {
}
-#--------------------------------------------------------------------------
-# Tests oserror-1.* test failures in the open() system call.
-#
-
-# Test a failure in open() due to too many files.
-#
-# The xOpen() method of the unix VFS calls getcwd() as well as open().
-# Although this does not appear to be documented in the man page, on OSX
-# a call to getcwd() may fail if there are no free file descriptors. So
-# an error may be reported for either open() or getcwd() here.
-#
-if {![clang_sanitize_address]} {
- unset -nocomplain rc
- unset -nocomplain nOpen
- set nOpen 20000
- do_test 1.1.1 {
- set ::log [list]
- set ::rc [catch {
- for {set i 0} {$i < $::nOpen} {incr i} { sqlite3 dbh_$i test.db -readonly 1 }
- } msg]
- if {$::rc==0} {
- # Some system (ex: Debian) are able to create 20000+ file descriptiors
- # such systems will not fail here
- set x ok
- } elseif {$::rc==1 && $msg=="unable to open database file"} {
- set x ok
- } else {
- set x [list $::rc $msg]
- }
- } {ok}
- do_test 1.1.2 {
- catch { for {set i 0} {$i < $::nOpen} {incr i} { dbh_$i close } }
- } $::rc
- if {$rc} {
- do_re_test 1.1.3 {
- lindex $::log 0
- } {^os_unix.c:\d+: \(\d+\) (open|getcwd)\(.*test.db\) - }
- }
-}
-
-
# Test a failure in open() due to the path being a directory.
#
do_test 1.2.1 {
--
1.8.3.1
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+58 -11
View File
@@ -1,22 +1,21 @@
%bcond_without check
%global extver 3340000
%global extver 3420000
%global tcl_version 8.6
%global tcl_sitearch %{_libdir}/tcl%{tcl_version}
Name: sqlite
Version: 3.34.0
Release: 1
Version: 3.42.0
Release: 2
Summary: Embeded SQL database
License: Public Domain
URL: http://www.sqlite.org/
Source0: https://www.sqlite.org/2020/sqlite-src-%{extver}.zip
Source1: http://www.sqlite.org/2020/sqlite-doc-%{extver}.zip
Source2: https://www.sqlite.org/2020/sqlite-autoconf-%{extver}.tar.gz
Source0: https://www.sqlite.org/2023/sqlite-src-%{extver}.zip
Source1: http://www.sqlite.org/2023/sqlite-doc-%{extver}.zip
Source2: https://www.sqlite.org/2023/sqlite-autoconf-%{extver}.tar.gz
Patch1: 0001-sqlite-no-malloc-usable-size.patch
Patch2: 0002-remove-fail-testcase-in-no-free-fd-situation.patch
Patch1: 0001-CVE-2023-7104.patch
BuildRequires: gcc autoconf tcl tcl-devel
BuildRequires: ncurses-devel readline-devel glibc-devel
@@ -60,13 +59,12 @@ This contains man files and HTML files for the using of sqlite.
#autosetup will fail because of 2 zip files
%setup -q -a1 -n %{name}-src-%{extver}
%patch1 -p1
%patch2 -p1
rm -f %{name}-doc-%{extver}/sqlite.css~ || :
autoconf
%build
autoconf
export CFLAGS="$RPM_OPT_FLAGS $RPM_LD_FLAGS -DSQLITE_ENABLE_COLUMN_METADATA=1 \
-DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_FTS3=3 \
-DSQLITE_ENABLE_RTREE=1 -DSQLITE_SECURE_DELETE=1 \
@@ -107,6 +105,10 @@ export MALLOC_CHECK_=3
%else
rm test/csv01.test
%endif
%ifarch loongarch64
rm -rf test/thread1.test
rm -rf test/thread2.test
%endif
make test
%endif # with check
@@ -131,6 +133,51 @@ make test
%{_mandir}/man*/*
%changelog
* Wed Sep 4 2024 wangmian <wangmian19@h-partners.com> - 3.42.0-2
- sync the CVE-2023-7104 from 2203
* Tue Feb 27 2024 Zheng Zhenyu <zheng.zhenyu@outlook.com> - 3.42.0-1
- Bump version to fix CVE-2024-0232
* Wed Jan 3 2024 mazhao <mazhao12@huawei.com> - 3.37.2-7
- fix the CVE-2023-7104
* Mon Aug 7 2023 zhuwentao <zhuwentao5@huawei.com> - 3.37.2-6
- fix the CVE-2023-36191
* Fri Jan 13 2023 Wenlong Zhang<zhangwenlong@loongson.cn> - 3.37.2-5
- remove fail testcase for loongarch
* Wed Dec 14 2022 zhuwentao <zhuwentao5@huawei.com> - 3.37.2-4
- fix the CVE-2022-46908
* Wed Sep 14 2022 zhuwentao <zhuwentao5@huawei.com> - 3.37.2-3
- fix build problem
* Mon Sep 5 2022 zhuwentao <zhuwentao5@huawei.com> - 3.37.2-2
- fix integer overflow on gigabyte string
* Mon Aug 29 2022 zhuwentao <zhuwentao5@huawei.com> - 3.37.2-1
- update to 3.37.2
* Tue Aug 16 2022 liusirui <liusirui@huawei.com> - 3.36.0-3
- fix the CVE-2022-35737.
* Sat Nov 27 2021 wbq_sky <wangbingquan@huawei.com> - 3.36.0-2
- fix the CVE-2021-36690.
* Fri Nov 25 2021 wbq_sky <wangbingquan@huawei.com> - 3.36.0-1
- update to 3.36.0.
* Fri Sep 26 2021 wbq_sky <wangbingquan@huawei.com> - 3.34.0-4
- fix the uninitialized value used in pattern match.
* Fri Sep 3 2021 wbq_sky <wangbingquan@huawei.com> - 3.34.0-3
- fix the null reference in the tigger statement.
* Fri Sep 3 2021 wbq_sky <wangbingquan@huawei.com> - 3.34.0-2
- fix the infinite loop problem in the trim function while the pattern is well formed.
* Thu Jan 14 2021 yanglongkang <yanglongkang@huawei.com> - 3.34.0-1
- update package to 3.34.0