b023c29a1e
#### Why I did it The current redis version of SONiC is `6.0.6`, which contains many high-risky security issues like CVEs that are fixed in the latest version. The Redis release notes also highly recommend to upgrade with SECURITY urgency. ``` ================================================================================ Redis 6.0.16 Released Mon Oct 4 12:00:00 IDT 2021 ================================================================================ Upgrade urgency: SECURITY, contains fixes to security issues. Security Fixes: * (CVE-2021-41099) Integer to heap buffer overflow handling certain string commands and network payloads, when proto-max-bulk-len is manually configured to a non-default, very large value [reported by yiyuaner]. * (CVE-2021-32762) Integer to heap buffer overflow issue in redis-cli and redis-sentinel parsing large multi-bulk replies on some older and less common platforms [reported by Microsoft Vulnerability Research]. * (CVE-2021-32687) Integer to heap buffer overflow with intsets, when set-max-intset-entries is manually configured to a non-default, very large value [reported by Pawel Wieczorkiewicz, AWS]. * (CVE-2021-32675) Denial Of Service when processing RESP request payloads with a large number of elements on many connections. * (CVE-2021-32672) Random heap reading issue with Lua Debugger [reported by Meir Shpilraien]. * (CVE-2021-32628) Integer to heap buffer overflow handling ziplist-encoded data types, when configuring a large, non-default value for hash-max-ziplist-entries, hash-max-ziplist-value, zset-max-ziplist-entries or zset-max-ziplist-value [reported by sundb]. * (CVE-2021-32627) Integer to heap buffer overflow issue with streams, when configuring a non-default, large value for proto-max-bulk-len and client-query-buffer-limit [reported by sundb]. * (CVE-2021-32626) Specially crafted Lua scripts may result with Heap buffer overflow [reported by Meir Shpilraien]. Other bug fixes: * Fix appendfsync to always guarantee fsync before reply, on MacOS and FreeBSD (kqueue) (#9416) * Fix the wrong mis-detection of sync_file_range system call, affecting performance (#9371) * Fix replication issues when repl-diskless-load is used (#9280) ``` #### How I did it Edit `Dockerfile.j2` file #### How to verify it Check redis version #### Description for the changelog This PR will upgrade redis-server version to `6.0.16`.
49 lines
2.1 KiB
Django/Jinja
49 lines
2.1 KiB
Django/Jinja
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
|
|
FROM docker-config-engine-bullseye
|
|
|
|
ARG docker_container_name
|
|
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf
|
|
|
|
# Make apt-get non-interactive
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
# Update apt's cache of available packages
|
|
RUN apt-get update
|
|
|
|
# Install redis-server
|
|
RUN apt-get install -y redis-tools redis-server
|
|
|
|
{% if docker_database_debs.strip() -%}
|
|
# Copy locally-built Debian package dependencies
|
|
{{ copy_files("debs/", docker_database_debs.split(' '), "/debs/") }}
|
|
|
|
# Install locally-built Debian packages and implicitly install their dependencies
|
|
{{ install_debian_packages(docker_database_debs.split(' ')) }}
|
|
{%- endif %}
|
|
|
|
# Clean up
|
|
RUN apt-get clean -y && \
|
|
apt-get autoclean -y && \
|
|
apt-get autoremove -y && \
|
|
rm -rf /debs ~/.cache && \
|
|
sed -ri 's/^(save .*$)/# \1/g; \
|
|
s/^daemonize yes$/daemonize no/; \
|
|
s/^logfile .*$/logfile ""/; \
|
|
s/^# syslog-enabled no$/syslog-enabled no/; \
|
|
s/^# unixsocket/unixsocket/; \
|
|
s/redis-server.sock/redis.sock/g; \
|
|
s/^client-output-buffer-limit pubsub [0-9]+mb [0-9]+mb [0-9]+/client-output-buffer-limit pubsub 0 0 0/ \
|
|
' /etc/redis/redis.conf
|
|
|
|
COPY ["supervisord.conf.j2", "/usr/share/sonic/templates/"]
|
|
COPY ["docker-database-init.sh", "/usr/local/bin/"]
|
|
COPY ["database_config.json.j2", "/usr/share/sonic/templates/"]
|
|
COPY ["database_global.json.j2", "/usr/share/sonic/templates/"]
|
|
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
|
|
COPY ["files/sysctl-net.conf", "/etc/sysctl.d/"]
|
|
COPY ["critical_processes", "/etc/supervisor"]
|
|
COPY ["files/update_chassisdb_config", "/usr/local/bin/"]
|
|
COPY ["flush_unused_database", "/usr/local/bin/"]
|
|
|
|
ENTRYPOINT ["/usr/local/bin/docker-database-init.sh"]
|