Bug 2347907 (CVE-2022-49690) - CVE-2022-49690 kernel: net/tls: fix tls_sk_proto_close executed repeatedly
Summary: CVE-2022-49690 kernel: net/tls: fix tls_sk_proto_close executed repeatedly
Keywords:
Status: NEW
Alias: CVE-2022-49690
Product: Security Response
Classification: Other
Component: vulnerability-draft
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-02-26 03:10 UTC by OSIDB Bzimport
Modified: 2025-05-15 07:40 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-02-26 03:10:55 UTC
In the Linux kernel, the following vulnerability has been resolved:

net/tls: fix tls_sk_proto_close executed repeatedly

After setting the sock ktls, update ctx->sk_proto to sock->sk_prot by
tls_update(), so now ctx->sk_proto->close is tls_sk_proto_close(). When
close the sock, tls_sk_proto_close() is called for sock->sk_prot->close
is tls_sk_proto_close(). But ctx->sk_proto->close() will be executed later
in tls_sk_proto_close(). Thus tls_sk_proto_close() executed repeatedly
occurred. That will trigger the following bug.

=================================================================
KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017]
RIP: 0010:tls_sk_proto_close+0xd8/0xaf0 net/tls/tls_main.c:306
Call Trace:
 <TASK>
 tls_sk_proto_close+0x356/0xaf0 net/tls/tls_main.c:329
 inet_release+0x12e/0x280 net/ipv4/af_inet.c:428
 __sock_release+0xcd/0x280 net/socket.c:650
 sock_close+0x18/0x20 net/socket.c:1365

Updating a proto which is same with sock->sk_prot is incorrect. Add proto
and sock->sk_prot equality check at the head of tls_update() to fix it.

Comment 1 Avinash Hanwate 2025-02-26 13:48:40 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025022627-CVE-2022-49690-2222@gregkh/T

Comment 4 Avinash Hanwate 2025-02-26 17:49:29 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025022627-CVE-2022-49690-2222@gregkh/T

Comment 7 TEJ RATHI 2025-05-15 07:37:20 UTC
This CVE has been rejected upstream: https://lore.kernel.org/linux-cve-announce/2025022623-REJECTED-7011@gregkh/


Note You need to log in before you can comment on or make changes to this bug.