Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 773328 (CVE-2021-21309) - <dev-db/redis-{5.0.12, 6.0.12}: integer overflow vulnerabilities in 32 bit builds (CVE-2021-21309)
Summary: <dev-db/redis-{5.0.12, 6.0.12}: integer overflow vulnerabilities in 32 bit bu...
Status: RESOLVED FIXED
Alias: CVE-2021-21309
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Gentoo Security
URL: https://github.com/redis/redis/securi...
Whiteboard: B1 [glsa+ cve]
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-27 20:35 UTC by John Helmert III
Modified: 2021-07-08 22:58 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2021-02-27 20:35:14 UTC
CVE-2021-21309:

Redis is an open-source, in-memory database that persists on disk. In affected versions of Redis an integer overflow bug in 32-bit Redis version 4.0 or newer could be exploited to corrupt the heap and potentially result with remote code execution. Redis 4.0 or newer uses a configurable limit for the maximum supported bulk input size. By default, it is 512MB which is a safe value for all platforms. If the limit is significantly increased, receiving a large request from a client may trigger several integer overflow scenarios, which would result with buffer overflow and heap corruption. We believe this could in certain conditions be exploited for remote code execution. By default, authenticated Redis users have access to all configuration parameters and can therefore use the “CONFIG SET proto-max-bulk-len” to change the safe default, making the system vulnerable. **This problem only affects 32-bit Redis (on a 32-bit system, or as a 32-bit executable running on a 64-bit system).** The problem is fixed in version 6.2, and the fix is back ported to 6.0.11 and 5.0.11. Make sure you use one of these versions if you are running 32-bit Redis. An additional workaround to mitigate the problem without patching the redis-server executable is to prevent clients from directly executing `CONFIG SET`: Using Redis 6.0 or newer, ACL configuration can be used to block the command. Using older versions, the `rename-command` configuration directive can be used to rename the command to a random string unknown to users, rendering it inaccessible. Please note that this workaround may have an additional impact on users or operational systems that expect `CONFIG SET` to behave in certain ways.

Patch: https://github.com/redis/redis/commit/c992857618db99776917f10bf4f2345a5fdc78b0

Please bump to 6.0.11 and 5.0.11.
Comment 1 Larry the Git Cow gentoo-dev 2021-03-04 04:19:49 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=30020b89b5e0d6ef497ab8983103eec7281abc95

commit 30020b89b5e0d6ef497ab8983103eec7281abc95
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-03-04 04:18:30 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-03-04 04:19:35 +0000

    dev-db/redis: security version bump to 5.0.12
    
    Bug: https://bugs.gentoo.org/773328
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-db/redis/Manifest            |   1 +
 dev-db/redis/redis-5.0.12.ebuild | 162 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 163 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2acd97bfc1f3fae1d6f0b82a02614ff1ed72403d

commit 2acd97bfc1f3fae1d6f0b82a02614ff1ed72403d
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-03-04 04:16:43 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-03-04 04:19:34 +0000

    dev-db/redis: security bump to 6.0.12
    
    Bug: https://bugs.gentoo.org/773328
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-db/redis/Manifest                           |   1 +
 dev-db/redis/files/redis-6.0.12-sharedlua.patch |  60 ++++++++
 dev-db/redis/redis-6.0.12.ebuild                | 184 ++++++++++++++++++++++++
 3 files changed, 245 insertions(+)
Comment 2 NATTkA bot gentoo-dev 2021-03-04 04:20:56 UTC Comment hidden (obsolete)
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-03-05 20:39:05 UTC
@Tomáš, let me know when you had a chance to test this.
Comment 4 Tomáš Mózes 2021-03-05 21:33:26 UTC
@Sam, just installed 6.0.12 on some testing machines, let's try to stabilize next week.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-03-11 06:56:12 UTC
(In reply to Tomáš Mózes from comment #4)
> @Sam, just installed 6.0.12 on some testing machines, let's try to stabilize
> next week.

+1
Comment 6 Tomáš Mózes 2021-03-11 10:17:15 UTC
So far no issues with 6.0.12 on amd64, feel free to call stabilization.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-03-11 10:30:58 UTC
(In reply to Tomáš Mózes from comment #6)
> So far no issues with 6.0.12 on amd64, feel free to call stabilization.

Thank you!
Comment 8 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2021-03-12 08:13:42 UTC
amd64 stable
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-03-14 01:20:49 UTC
ppc64 done
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-03-14 22:12:02 UTC
ppc done
Comment 11 Thomas Deutschmann (RETIRED) gentoo-dev 2021-03-15 01:40:35 UTC
x86 stable
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-03-25 23:42:29 UTC
arm64 done
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-03-28 11:03:05 UTC
arm done

all arches done
Comment 14 NATTkA bot gentoo-dev 2021-03-28 11:05:01 UTC
Resetting sanity check; keywords are not fully specified and arches are not CC-ed.
Comment 15 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2021-03-28 14:48:37 UTC
Please cleanup
Comment 16 Larry the Git Cow gentoo-dev 2021-03-31 11:54:23 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9deb0bf5a36359f9c7864e3c2625f203e6e26738

commit 9deb0bf5a36359f9c7864e3c2625f203e6e26738
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2021-03-31 11:54:02 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2021-03-31 11:54:02 +0000

    dev-db/redis: security cleanup
    
    Bug: https://bugs.gentoo.org/773328
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 dev-db/redis/Manifest                |   2 -
 dev-db/redis/redis-5.0.9-r1.ebuild   | 162 ----------------------------------
 dev-db/redis/redis-6.0.9-r100.ebuild | 164 -----------------------------------
 3 files changed, 328 deletions(-)
Comment 17 Thomas Deutschmann (RETIRED) gentoo-dev 2021-03-31 11:55:17 UTC
New GLSA request filed.
Comment 18 Larry the Git Cow gentoo-dev 2021-06-11 01:10:58 UTC Comment hidden (obsolete)
Comment 19 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-07-08 22:58:01 UTC
Oh, this was already GLSAed as https://security.gentoo.org/glsa/202103-02. Tree is clean.