Compare commits
10 Commits
c6ec14912a
...
ac59ea6ddc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac59ea6ddc | ||
|
|
ab0fcf6ff6 | ||
|
|
448139bb66 | ||
|
|
dca0979f3e | ||
|
|
7f8046249c | ||
|
|
357dfdc018 | ||
|
|
5300c04db1 | ||
|
|
81929fdd92 | ||
|
|
d8096737f6 | ||
|
|
6002168fd3 |
BIN
bytecode-330.cvd
BIN
bytecode-330.cvd
Binary file not shown.
BIN
bytecode-335.cvd
Normal file
BIN
bytecode-335.cvd
Normal file
Binary file not shown.
Binary file not shown.
19
clamav-clamonacc-service.patch
Normal file
19
clamav-clamonacc-service.patch
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
--- ./clamonacc/clamav-clamonacc.service.in.clamonacc-service 2022-05-05 22:36:27.572671129 +0100
|
||||||
|
+++ ./clamonacc/clamav-clamonacc.service.in 2022-05-05 22:43:05.204324524 +0100
|
||||||
|
@@ -4,14 +4,12 @@
|
||||||
|
[Unit]
|
||||||
|
Description=ClamAV On-Access Scanner
|
||||||
|
Documentation=man:clamonacc(8) man:clamd.conf(5) https://docs.clamav.net/
|
||||||
|
-Requires=clamav-daemon.service
|
||||||
|
-After=clamav-daemon.service syslog.target network.target
|
||||||
|
+After=clamd@scan.service syslog.target network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=root
|
||||||
|
-ExecStartPre=/bin/bash -c "while [ ! -S /run/clamav/clamd.ctl ]; do sleep 1; done"
|
||||||
|
-ExecStart=@prefix@/sbin/clamonacc -F --log=/var/log/clamav/clamonacc.log --move=/root/quarantine
|
||||||
|
+ExecStart=@prefix@/sbin/clamonacc -F --config-file=/etc/clamd.d/scan.conf
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
@ -1,6 +1,13 @@
|
|||||||
--- ./freshclam/clamav-freshclam.service.in.orig 2021-02-01 20:49:25.000000000 +0000
|
--- ./freshclam/clamav-freshclam.service.in.orig 2021-06-14 10:36:39.029730737 +0100
|
||||||
+++ ./freshclam/clamav-freshclam.service.in 2021-03-07 22:59:34.476455890 +0000
|
+++ ./freshclam/clamav-freshclam.service.in 2021-06-14 10:37:53.621423748 +0100
|
||||||
@@ -8,7 +8,6 @@ After=network-online.target
|
@@ -2,13 +2,12 @@
|
||||||
|
Description=ClamAV virus database updater
|
||||||
|
Documentation=man:freshclam(1) man:freshclam.conf(5) https://docs.clamav.net/
|
||||||
|
# If user wants it run from cron, don't start the daemon.
|
||||||
|
-ConditionPathExists=!/etc/cron.d/clamav-freshclam
|
||||||
|
+# ConditionPathExists=!/etc/cron.d/clamav-update
|
||||||
|
Wants=network-online.target
|
||||||
|
After=network-online.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=@prefix@/bin/freshclam -d --foreground=true
|
ExecStart=@prefix@/bin/freshclam -d --foreground=true
|
||||||
|
|||||||
@ -1,34 +0,0 @@
|
|||||||
From fe45bca164deeb1be053f5755546d71cc5dfd89b Mon Sep 17 00:00:00 2001
|
|
||||||
From: caodongxia <315816521@qq.com>
|
|
||||||
Date: Mon, 9 Aug 2021 14:27:22 +0800
|
|
||||||
Subject: [PATCH] fix-return-val-process
|
|
||||||
|
|
||||||
---
|
|
||||||
clamonacc/client/client.c | 10 +++++-----
|
|
||||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/clamonacc/client/client.c b/clamonacc/client/client.c
|
|
||||||
index 347070f..71c153d 100644
|
|
||||||
--- a/clamonacc/client/client.c
|
|
||||||
+++ b/clamonacc/client/client.c
|
|
||||||
@@ -207,12 +207,12 @@ int16_t onas_ping_clamd(struct onas_context **ctx)
|
|
||||||
|
|
||||||
if (opt) {
|
|
||||||
attempt_str = cli_strdup(opt->strarg);
|
|
||||||
+ if (NULL == attempt_str) {
|
|
||||||
+ logg("!could not allocate memory for string\n");
|
|
||||||
+ ret = -1;
|
|
||||||
+ goto done;
|
|
||||||
+ }
|
|
||||||
if (attempt_str) {
|
|
||||||
- if (NULL == attempt_str) {
|
|
||||||
- logg("!could not allocate memory for string\n");
|
|
||||||
- ret = -1;
|
|
||||||
- goto done;
|
|
||||||
- }
|
|
||||||
interval_str = strchr(attempt_str, ':');
|
|
||||||
if ((NULL != interval_str) && (interval_str[0] != '\0')) {
|
|
||||||
interval_str[0] = '\0';
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
||||||
@ -1,57 +0,0 @@
|
|||||||
From adcae42c2094096606a26976fb5829aa1ce5937b Mon Sep 17 00:00:00 2001
|
|
||||||
From: caodongxia <315816521@qq.com>
|
|
||||||
Date: Mon, 31 May 2021 16:43:12 +0800
|
|
||||||
Subject: [PATCH] create patch
|
|
||||||
|
|
||||||
---
|
|
||||||
libclamav/upx.c | 6 +++---
|
|
||||||
libclammspack/mspack/cabd.c | 2 +-
|
|
||||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libclamav/upx.c b/libclamav/upx.c
|
|
||||||
index 4663861..0e7b2c8 100644
|
|
||||||
--- a/libclamav/upx.c
|
|
||||||
+++ b/libclamav/upx.c
|
|
||||||
@@ -333,7 +333,7 @@ int upx_inflate2b(const char *src, uint32_t ssize, char *dst, uint32_t *dsize, u
|
|
||||||
return -1;
|
|
||||||
if (backbytes & 0xff000000)
|
|
||||||
return -1;
|
|
||||||
- backbytes <<= 8;
|
|
||||||
+ backbytes = (int32_t)((uint32_t)(backbytes) << 8);
|
|
||||||
backbytes += (unsigned char)(src[scur++]);
|
|
||||||
backbytes ^= 0xffffffff;
|
|
||||||
|
|
||||||
@@ -425,7 +425,7 @@ int upx_inflate2d(const char *src, uint32_t ssize, char *dst, uint32_t *dsize, u
|
|
||||||
return -1;
|
|
||||||
if (backbytes & 0xff000000)
|
|
||||||
return -1;
|
|
||||||
- backbytes <<= 8;
|
|
||||||
+ backbytes = (int32_t)((uint32_t)(backbytes) << 8);
|
|
||||||
backbytes += (unsigned char)(src[scur++]);
|
|
||||||
backbytes ^= 0xffffffff;
|
|
||||||
|
|
||||||
@@ -517,7 +517,7 @@ int upx_inflate2e(const char *src, uint32_t ssize, char *dst, uint32_t *dsize, u
|
|
||||||
return -1;
|
|
||||||
if (backbytes & 0xff000000)
|
|
||||||
return -1;
|
|
||||||
- backbytes <<= 8;
|
|
||||||
+ backbytes = (int32_t)((uint32_t)(backbytes) << 8);
|
|
||||||
backbytes += (unsigned char)(src[scur++]);
|
|
||||||
backbytes ^= 0xffffffff;
|
|
||||||
|
|
||||||
diff --git a/libclammspack/mspack/cabd.c b/libclammspack/mspack/cabd.c
|
|
||||||
index 75ef277..4dffd6b 100644
|
|
||||||
--- a/libclammspack/mspack/cabd.c
|
|
||||||
+++ b/libclammspack/mspack/cabd.c
|
|
||||||
@@ -1398,7 +1398,7 @@ static unsigned int cabd_checksum(unsigned char *data, unsigned int bytes,
|
|
||||||
unsigned int len, ul = 0;
|
|
||||||
|
|
||||||
for (len = bytes >> 2; len--; data += 4) {
|
|
||||||
- cksum ^= ((data[0]) | (data[1]<<8) | (data[2]<<16) | (data[3]<<24));
|
|
||||||
+ cksum ^= ((data[0]) | ((unsigned int)(data[1])<<8) | ((unsigned int)(data[2])<<16) | ((unsigned int)(data[3])<<24));
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (bytes & 3) {
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
||||||
@ -3,4 +3,4 @@ MAILTO=root
|
|||||||
|
|
||||||
## It is ok to execute it as root; freshclam drops privileges and becomes
|
## It is ok to execute it as root; freshclam drops privileges and becomes
|
||||||
## user 'clamupdate' as soon as possible
|
## user 'clamupdate' as soon as possible
|
||||||
0 */3 * * * root /usr/share/clamav/freshclam-sleep
|
0 */3 * * * root /usr/share/clamav/freshclam-sleep > /dev/null
|
||||||
|
|||||||
@ -1,4 +1,8 @@
|
|||||||
/var/log/freshclam.log {
|
/var/log/freshclam.log {
|
||||||
monthly
|
monthly
|
||||||
notifempty
|
notifempty
|
||||||
|
missingok
|
||||||
|
postrotate
|
||||||
|
systemctl try-restart clamav-freshclam.service
|
||||||
|
endscript
|
||||||
}
|
}
|
||||||
|
|||||||
61
clamav.spec
61
clamav.spec
@ -1,6 +1,6 @@
|
|||||||
Name: clamav
|
Name: clamav
|
||||||
Summary: End-user tools for the Clam Antivirus scanner
|
Summary: End-user tools for the Clam Antivirus scanner
|
||||||
Version: 0.103.6
|
Version: 0.103.12
|
||||||
Release: 1
|
Release: 1
|
||||||
|
|
||||||
License: GPLv2 and Public Domain and bzip2-1.0.6 and Zlib and Apache-2.0
|
License: GPLv2 and Public Domain and bzip2-1.0.6 and Zlib and Apache-2.0
|
||||||
@ -8,9 +8,9 @@ URL: https://www.clamav.net/
|
|||||||
Source0: https://www.clamav.net/downloads/production/clamav-%{version}.tar.gz
|
Source0: https://www.clamav.net/downloads/production/clamav-%{version}.tar.gz
|
||||||
Source1: clamd.sysconfig
|
Source1: clamd.sysconfig
|
||||||
Source2: clamd.logrotate
|
Source2: clamd.logrotate
|
||||||
Source3: main-58.cvd
|
Source3: main-62.cvd
|
||||||
Source4: daily-25550.cvd
|
Source4: daily-27388.cvd
|
||||||
Source5: bytecode-330.cvd
|
Source5: bytecode-335.cvd
|
||||||
Source7: freshclam-sleep
|
Source7: freshclam-sleep
|
||||||
Source8: freshclam.sysconfig
|
Source8: freshclam.sysconfig
|
||||||
Source9: clamav-update.crond
|
Source9: clamav-update.crond
|
||||||
@ -24,10 +24,11 @@ Source15: clamd@.service
|
|||||||
Patch0001: clamav-stats-deprecation.patch
|
Patch0001: clamav-stats-deprecation.patch
|
||||||
Patch0002: clamav-default_confs.patch
|
Patch0002: clamav-default_confs.patch
|
||||||
Patch0003: clamav-0.99-private.patch
|
Patch0003: clamav-0.99-private.patch
|
||||||
|
Patch0005: clamav-clamonacc-service.patch
|
||||||
Patch0006: clamav-freshclam.service.patch
|
Patch0006: clamav-freshclam.service.patch
|
||||||
Patch0007: clamav-type-conversion.patch
|
Patch0007: clamav-clamonacc-version-return.patch
|
||||||
Patch0008: clamav-return-val-process.patch
|
Patch0008: fix-clamonacc-w-error.patch
|
||||||
Patch0009: clamav-clamonacc-version-return.patch
|
Patch0019: fix-the-failure-to-execute-the-clambc-command-under-the-clamav-package.patch
|
||||||
|
|
||||||
BuildRequires: autoconf automake gettext-devel libtool libtool-ltdl-devel
|
BuildRequires: autoconf automake gettext-devel libtool libtool-ltdl-devel
|
||||||
BuildRequires: gcc-c++ zlib-devel bzip2-devel gmp-devel curl-devel json-c-devel
|
BuildRequires: gcc-c++ zlib-devel bzip2-devel gmp-devel curl-devel json-c-devel
|
||||||
@ -60,12 +61,7 @@ The clamav-devel package contains headerfiles and libraries
|
|||||||
which are needed to build applications using clamav.
|
which are needed to build applications using clamav.
|
||||||
|
|
||||||
|
|
||||||
%package help
|
%package_help
|
||||||
Summary: man info for clamav
|
|
||||||
|
|
||||||
%description help
|
|
||||||
The clamav-help package contains man information for clamav.
|
|
||||||
|
|
||||||
|
|
||||||
%package filesystem
|
%package filesystem
|
||||||
Summary: Filesystem structure for clamav
|
Summary: Filesystem structure for clamav
|
||||||
@ -265,7 +261,7 @@ touch $RPM_BUILD_ROOT{%_rundir/clamav-milter/clamav-milter.{socket,pid},%_var/lo
|
|||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
make check
|
%make_build check
|
||||||
|
|
||||||
|
|
||||||
%pre filesystem
|
%pre filesystem
|
||||||
@ -333,17 +329,11 @@ test -e %_var/log/clamav-milter.log || {
|
|||||||
%postun milter
|
%postun milter
|
||||||
%systemd_postun_with_restart clamav-milter.service
|
%systemd_postun_with_restart clamav-milter.service
|
||||||
|
|
||||||
%post
|
|
||||||
/sbin/ldconfig
|
|
||||||
|
|
||||||
%postun
|
|
||||||
/sbin/ldconfig
|
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%exclude %_unitdir/clamav-{daemon,freshclam}.*
|
%exclude %_unitdir/clamav-{daemon,freshclam}.*
|
||||||
%exclude %_rundir/*/*.pid
|
%exclude %_rundir/*/*.pid
|
||||||
%doc NEWS.md README.md docs/html COPYING
|
%license COPYING
|
||||||
|
%doc NEWS.md README.md docs/html
|
||||||
%_bindir/{clambc,clamconf,clamdscan,clamdtop,clamscan,clamsubmit,sigtool}
|
%_bindir/{clambc,clamconf,clamdscan,clamdtop,clamscan,clamsubmit,sigtool}
|
||||||
%_libdir/libclamav.so.9*
|
%_libdir/libclamav.so.9*
|
||||||
%_libdir/libclammspack.so.0*
|
%_libdir/libclammspack.so.0*
|
||||||
@ -359,11 +349,7 @@ test -e %_var/log/clamav-milter.log || {
|
|||||||
%_bindir/clamav-config
|
%_bindir/clamav-config
|
||||||
|
|
||||||
%files help
|
%files help
|
||||||
%_mandir/man[15]/*
|
%_mandir/man?/*
|
||||||
%_mandir/man8/clamd.8*
|
|
||||||
%_mandir/man8/clamav-milter*
|
|
||||||
%_mandir/man8/clamonacc.8*
|
|
||||||
%_mandir/*/freshclam*
|
|
||||||
|
|
||||||
%files filesystem
|
%files filesystem
|
||||||
%attr(-,clamav,clamav) %dir %_var/lib/clamav
|
%attr(-,clamav,clamav) %dir %_var/lib/clamav
|
||||||
@ -412,6 +398,25 @@ test -e %_var/log/clamav-milter.log || {
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Sep 06 2024 Funda Wang <fundawang@yeah.net> - 0.103.12-1
|
||||||
|
- Upgrade to 0.103.12
|
||||||
|
|
||||||
|
* Wed Mar 20 2024 yaoxin <yao_xin001@hoperun.com> - 0.103.11-1
|
||||||
|
- Upgrade to 0.103.11
|
||||||
|
|
||||||
|
* Tue Aug 22 2023 wangkai <wang_kai001@hoperun.com> - 0.103.9-1
|
||||||
|
- Update to 0.103.9 to fix CVE-2023-20197
|
||||||
|
|
||||||
|
* Wed Mar 15 2023 yaoxin <yaoxin30@h-partners.com> - 0.103.8-1
|
||||||
|
- Update to 0.103.8 to fix CVE-2023-20032 and CVE-2023-20052
|
||||||
|
|
||||||
|
* Thu May 26 2022 liyanan <liyanan32@h-partners.com> - 0.103.6-3
|
||||||
|
- Fix the failure to execute the clambc command under the clamav package
|
||||||
|
- Fix clamonacc -w error
|
||||||
|
|
||||||
|
* Wed May 25 2022 houyingchao <houyingchao@h-partners.com> - 0.103.6-2
|
||||||
|
- Fix start clamav-clamonacc-service
|
||||||
|
|
||||||
* Fri May 13 2022 houyingchao <houyingchao@h-partners.com> - 0.103.6-1
|
* Fri May 13 2022 houyingchao <houyingchao@h-partners.com> - 0.103.6-1
|
||||||
- Upgrade to 0.103.6
|
- Upgrade to 0.103.6
|
||||||
- Fix CVE-2022-20785 CVE-2022-20771 CVE-2022-20770 CVE-2022-20792
|
- Fix CVE-2022-20785 CVE-2022-20771 CVE-2022-20770 CVE-2022-20792
|
||||||
@ -434,7 +439,7 @@ test -e %_var/log/clamav-milter.log || {
|
|||||||
* Fri Oct 09 2020 lingsheng <lingsheng@huawei.com> - 0.101.4-7
|
* Fri Oct 09 2020 lingsheng <lingsheng@huawei.com> - 0.101.4-7
|
||||||
- Fix int64 overflow check
|
- Fix int64 overflow check
|
||||||
|
|
||||||
* Tue Sep 21 2020 chengzihan <chengzihan2@huawei.com> - 0.101.4-6
|
* Mon Sep 21 2020 chengzihan <chengzihan2@huawei.com> - 0.101.4-6
|
||||||
- Drop clamd@scann.service file, change /var/run to /run
|
- Drop clamd@scann.service file, change /var/run to /run
|
||||||
|
|
||||||
* Thu Mar 12 2020 wutao <wutao61@huawei.com> - 0.101.4-5
|
* Thu Mar 12 2020 wutao <wutao61@huawei.com> - 0.101.4-5
|
||||||
|
|||||||
@ -7,7 +7,7 @@ After = syslog.target nss-lookup.target network.target
|
|||||||
Type = forking
|
Type = forking
|
||||||
ExecStart = /usr/sbin/clamd -c /etc/clamd.d/%i.conf
|
ExecStart = /usr/sbin/clamd -c /etc/clamd.d/%i.conf
|
||||||
# Reload the database
|
# Reload the database
|
||||||
# ExecReload=/bin/kill -USR2 $MAINPID
|
ExecReload=/bin/kill -USR2 $MAINPID
|
||||||
Restart = on-failure
|
Restart = on-failure
|
||||||
TimeoutStartSec=420
|
TimeoutStartSec=420
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
25
fix-clamonacc-w-error.patch
Normal file
25
fix-clamonacc-w-error.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From e5de0bd90f856ed8c9b4e05e6e9c4f46920112a6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: chen-jan <chen_aka_jan@163.com>
|
||||||
|
Date: Tue, 7 Dec 2021 08:18:21 +0000
|
||||||
|
Subject: [PATCH] fix clamonacc -w error
|
||||||
|
|
||||||
|
---
|
||||||
|
clamonacc/client/client.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/clamonacc/client/client.c b/clamonacc/client/client.c
|
||||||
|
index 347070f..f507eee 100644
|
||||||
|
--- a/clamonacc/client/client.c
|
||||||
|
+++ b/clamonacc/client/client.c
|
||||||
|
@@ -205,7 +205,7 @@ int16_t onas_ping_clamd(struct onas_context **ctx)
|
||||||
|
/* ping command takes the form --ping [attempts[:interval]] */
|
||||||
|
opt = optget((*ctx)->opts, "ping");
|
||||||
|
|
||||||
|
- if (opt) {
|
||||||
|
+ if (opt && opt->strarg) {
|
||||||
|
attempt_str = cli_strdup(opt->strarg);
|
||||||
|
if (attempt_str) {
|
||||||
|
if (NULL == attempt_str) {
|
||||||
|
--
|
||||||
|
2.30.0
|
||||||
|
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
diff -Nur clamav-0.103.6/clambc/bcrun.c clamav-0.103.6_bak/clambc/bcrun.c
|
||||||
|
--- clamav-0.103.6/clambc/bcrun.c 2022-05-02 12:46:41.000000000 +0800
|
||||||
|
+++ clamav-0.103.6_bak/clambc/bcrun.c 2022-05-26 10:02:06.307956926 +0800
|
||||||
|
@@ -406,7 +406,7 @@
|
||||||
|
// ctx was memset, so recursion_level starts at 0.
|
||||||
|
cctx.recursion_stack[cctx.recursion_level].fmap = map;
|
||||||
|
cctx.recursion_stack[cctx.recursion_level].type = CL_TYPE_ANY; /* ANY for the top level, because we don't yet know the type. */
|
||||||
|
- cctx.recursion_stack[cctx.recursion_level].size = map->len;
|
||||||
|
+ //cctx.recursion_stack[cctx.recursion_level].size = map->len;
|
||||||
|
|
||||||
|
cctx.fmap = cctx.recursion_stack[cctx.recursion_level].fmap;
|
||||||
|
|
||||||
2
freshclam-sleep
Executable file → Normal file
2
freshclam-sleep
Executable file → Normal file
@ -49,4 +49,4 @@ WARNING: update of clamav database is disabled; please see
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
/usr/bin/freshclam --quiet
|
/usr/bin/freshclam --quiet > /dev/null
|
||||||
|
|||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user