Bug 1210138 (CVE-2021-28235) - VUL-0: CVE-2021-28235: etcd: Information discosure via debug function
Summary: VUL-0: CVE-2021-28235: etcd: Information discosure via debug function
Status: RESOLVED WONTFIX
Alias: CVE-2021-28235
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Containers Team
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/362296/
Whiteboard: CVSSv3.1:SUSE:CVE-2021-28235:8.1:(AV:...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-05 07:42 UTC by Alexander Bergmann
Modified: 2024-04-30 09:24 UTC (History)
4 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Alexander Bergmann 2023-04-05 07:43:40 UTC
There are no details available for this security issue.

I've asked upstream to comment on this.

https://groups.google.com/g/etcd-dev/c/cXFg8Zhef5w
Comment 2 Alexander Bergmann 2023-05-17 12:40:51 UTC
Comment from upstream:

It's a valid CVE, and we already resolved it in https://github.com/etcd-io/etcd/pull/15648.

The issue can only happen when all the following conditions are true:

- The auth is enabled;
- The log level is set to "debug";
- Clients send authentication request to etcdserver with username & password.

Note that client SDK sends authentication request automatically when reading or writing data.
Comment 4 Klaus Kämpf 2023-06-14 15:49:10 UTC
(In reply to Alexander Bergmann from comment #2)

> The issue can only happen when all the following conditions are true:
> 
> - The auth is enabled;
> - The log level is set to "debug";
> - Clients send authentication request to etcdserver with username & password.


Log level "debug" isn't really "production grade". iow, it's very unlikely our single remaining customer will be exposed to this.

Any chance to downgrade severity (and save engineering the hassle of a maintenance upgrade) ?
Comment 5 Tomas Hehejik 2023-06-15 10:24:11 UTC
I believe CaaSP is not affected by this vulnerability.

I just did small research on latest CaaSP 4.2.9 with current registry.suse.com/caasp/v4/etcd:3.4.13 image:
* the debug flag `--log-level=debug` or `--debug` not set for etcd command (see bellow)
* no user present in the etcd configuration:
(called from etcd pod)
> # etcdctl --endpoints=https://127.0.0.1:2379 --cacert=/etc/kubernetes/pki/etcd/ca.crt --cert=/etc/kubernetes/pki/etcd/peer.crt --key=/etc/kubernetes/pki/etcd/peer.key user list
> No output == means there are no users set at all, I could add an user by "user add root" and then he was present in the command ^ output

Changing etcd's static pod definition to custom values and/or adding custom users is possible but unsupported and has potential to break updates.

This is the etcd static pod definition.
```
  - command:
    - etcd
    - --advertise-client-urls=https://x.x.x.x:2379
    - --cert-file=/etc/kubernetes/pki/etcd/server.crt
    - --client-cert-auth=true
    - --data-dir=/var/lib/etcd
    - --initial-advertise-peer-urls=https://x.x.x.x:2380
    - --initial-cluster=caasp-master-th-429-before-0=https://x.x.x.x:2380
    - --key-file=/etc/kubernetes/pki/etcd/server.key
    - --listen-client-urls=https://127.0.0.1:2379,https://x.x.x.x:2379
    - --listen-metrics-urls=http://127.0.0.1:2381
    - --listen-peer-urls=https://x.x.x.x:2380
    - --name=caasp-master-th-429-before-0
    - --peer-cert-file=/etc/kubernetes/pki/etcd/peer.crt
    - --peer-client-cert-auth=true
    - --peer-key-file=/etc/kubernetes/pki/etcd/peer.key
    - --peer-trusted-ca-file=/etc/kubernetes/pki/etcd/ca.crt
    - --snapshot-count=10000
    - --trusted-ca-file=/etc/kubernetes/pki/etcd/ca.crt
```

So from the conditions we meet only the first bullet - enabled auth, but only by using key/cert
Comment 6 Tomas Hehejik 2023-06-15 12:52:04 UTC
In the end the CaaSP will be marked as `Not Affected` by this bug on https://www.suse.com/security/cve/CVE-2021-28235.html. 

Thanks to abergmann@suse.com
Comment 7 Alexander Bergmann 2024-04-30 09:24:55 UTC
Closing bug as wontfix.