Bug 1223224 - VUL-0: CVE-2024-32650: kubectl-view-allocations: rust-rustls: Infinite loop in rustls::conn::ConnectionCommon:complete_io() with proper client input
Summary: VUL-0: CVE-2024-32650: kubectl-view-allocations: rust-rustls: Infinite loop i...
Status: RESOLVED FIXED
Alias: None
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Johannes Kastl
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/402742/
Whiteboard: CVSSv3.1:SUSE:CVE-2024-32650:7.5:(AV:...
Keywords:
Depends on:
Blocks: CVE-2024-32650
  Show dependency treegraph
 
Reported: 2024-04-22 11:36 UTC by Carlos López
Modified: 2024-04-24 11:37 UTC (History)
1 user (show)

See Also:
Found By: ---
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.
Description Carlos López 2024-04-22 11:36:01 UTC
kubectl-view-allocations embeds rust-rustls:

Rustls is a modern TLS library written in Rust. `rustls::ConnectionCommon::complete_io` could fall into an infinite loop based on network input. When using a blocking rustls server, if a client send a `close_notify` message immediately after `client_hello`, the server's `complete_io` will get in an infinite loop. This vulnerability is fixed in 0.23.5, 0.22.4, and 0.21.11.

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2024-32650
https://bugzilla.redhat.com/show_bug.cgi?id=2276085
https://www.cve.org/CVERecord?id=CVE-2024-32650
https://github.com/rustls/rustls/commit/2123576840aa31043a31b0770e6572136fbe0c2d
https://github.com/rustls/rustls/commit/6e938bcfe82a9da7a2e1cbf10b928c7eca26426e
https://github.com/rustls/rustls/commit/f45664fbded03d833dffd806503d3c8becd1b71e
https://github.com/rustls/rustls/security/advisories/GHSA-6g7w-8wpp-frhj
Comment 1 Johannes Kastl 2024-04-23 19:10:19 UTC
Hi,

I just updated kubectl-view-allocations to the latest release 0.19.3.

How can I check that a fixed version of rustls is being used?

The cargo.toml (https://github.com/davidB/kubectl-view-allocations/blob/0.19.2/Cargo.toml#L24) only mentions the name, not a version.

The vendor.tar.xz tarball contains a directory rustls, where the Cargo.toml states that this is version 0.23.5.

So I guess this should be fixed by SR#1169924
https://build.opensuse.org/request/show/1169924

Kind Regards,
Johannes
Comment 2 OBSbugzilla Bot 2024-04-23 20:05:03 UTC
This is an autogenerated message for OBS integration:
This bug (1223224) was mentioned in
https://build.opensuse.org/request/show/1169929 Factory / kubectl-view-allocations
Comment 3 Carlos López 2024-04-24 08:35:16 UTC
(In reply to Johannes Kastl from comment #1)
> Hi,
> 
> I just updated kubectl-view-allocations to the latest release 0.19.3.
> 
> How can I check that a fixed version of rustls is being used?

You should see the fixed version in the generated Cargo.lock file, or in the Cargo.toml of the vendored rustls crate.

> The cargo.toml
> (https://github.com/davidB/kubectl-view-allocations/blob/0.19.2/Cargo.
> toml#L24) only mentions the name, not a version.

That's not the rustls crate, thats a feature of the kube crate.

> The vendor.tar.xz tarball contains a directory rustls, where the Cargo.toml
> states that this is version 0.23.5.
> 
> So I guess this should be fixed by SR#1169924
> https://build.opensuse.org/request/show/1169924

Yes, I verified that the package in devel:kubic/kubectl-view-allocations contains the fixed rustls version.
Comment 4 Johannes Kastl 2024-04-24 11:23:37 UTC
Hi Carlos,

thanks for checking, nice to see that this is fixed in the new package.

For the record, where would a rust project define its dependencies? In the cargo.toml that I linked?
(Only that rustls is not explicitely mentioned, but a transient dependency of one of the things that are mentioned?

Kind Regards,
Johannes
Comment 5 Carlos López 2024-04-24 11:37:49 UTC
(In reply to Johannes Kastl from comment #4)
> Hi Carlos,
> 
> thanks for checking, nice to see that this is fixed in the new package.
> 
> For the record, where would a rust project define its dependencies? In the
> cargo.toml that I linked?
> (Only that rustls is not explicitely mentioned, but a transient dependency
> of one of the things that are mentioned?
> 
> Kind Regards,
> Johannes

The human-readable place for top-level dependencies is Cargo.toml. The full list of dependencies (including those down the tree) is in Cargo.lock, which is autogenerated by cargo.