Bug 1200126 (CVE-2022-31015)

Summary: VUL-0: CVE-2022-31015: python-waitress: uncaught Exception (due to a data race) leads to process termination
Product: [openSUSE] openSUSE Distribution Reporter: Hu <cathy.hu>
Component: SecurityAssignee: Dirk Mueller <dmueller>
Status: RESOLVED FIXED QA Contact: Security Team bot <security-team>
Severity: Normal    
Priority: P3 - Medium    
Version: Leap 15.4   
Target Milestone: ---   
Hardware: Other   
OS: Other   
URL: https://smash.suse.de/issue/333262/
Whiteboard:
Found By: Security Response Team Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Hu 2022-06-01 14:43:51 UTC
rh#2092246

Waitress versions 2.1.0 and 2.1.1 may terminate early due to a thread closing a socket while the main thread is about to call select(). This will lead to the main thread raising an exception that is not handled and then causing the entire application to be killed. 

This issue has been fixed in Waitress 2.1.2 by no longer allowing the WSGI thread to close the socket. Instead, that is always delegated to the main thread. There is no work-around for this issue. However, users using waitress behind a reverse proxy server are less likely to have issues if the reverse proxy always reads the full response.

https://github.com/Pylons/waitress/pull/377
https://github.com/Pylons/waitress/issues/374
https://github.com/Pylons/waitress/security/advisories/GHSA-f5x9-8jwc-25rw
https://github.com/Pylons/waitress/commit/4f6789b035610e0552738cdc4b35ca809a592d48

References:
https://bugzilla.redhat.com/show_bug.cgi?id=2092246
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2022-31015
https://github.com/Pylons/waitress/pull/377
https://github.com/Pylons/waitress/security/advisories/GHSA-f5x9-8jwc-25rw
https://github.com/Pylons/waitress/commit/4f6789b035610e0552738cdc4b35ca809a592d48
https://github.com/Pylons/waitress/issues/374
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-31015
Comment 1 Hu 2022-06-01 14:43:58 UTC
Affected:
- openSUSE:Factory/python-waitress                               2.1.1

Not Affected:
- SUSE:SLE-12-SP3:Update:Products:Cloud8:Update/python-waitress  1.4.3
- SUSE:SLE-12-SP4:Update:Products:Cloud9:Update/python-waitress  1.4.3
- SUSE:SLE-15:Update/python-waitress                             1.4.3
Comment 2 Dirk Mueller 2022-09-19 09:18:47 UTC
This has been fixed in Factory even before this bugreport has been filed.
Comment 3 OBSbugzilla Bot 2022-09-19 09:55:04 UTC
This is an autogenerated message for OBS integration:
This bug (1200126) was mentioned in
https://build.opensuse.org/request/show/1004640 Factory / python-waitress