smack: tcp: ipv4, fix incorrect labeling
Currently, Smack mirrors the label of incoming tcp/ipv4 connections:
when a label 'foo' connects to a label 'bar' with tcp/ipv4,
'foo' always gets 'foo' in returned ipv4 packets. So,
1) returned packets are incorrectly labeled ('foo' instead of 'bar')
2) 'bar' can write to 'foo' without being authorized to write.
Here is a scenario how to see this:
* Take two machines, let's call them C and S,
with active Smack in the default state
(no settings, no rules, no labeled hosts, only builtin labels)
* At S, add Smack rule 'foo bar w'
(labels 'foo' and 'bar' are instantiated at S at this moment)
* At S, at label 'bar', launch a program
that listens for incoming tcp/ipv4 connections
* From C, at label 'foo', connect to the listener at S.
(label 'foo' is instantiated at C at this moment)
Connection succeedes and works.
* Send some data in both directions.
* Collect network traffic of this connection.
All packets in both directions are labeled with the CIPSO
of the label 'foo'. Hence, label 'bar' writes to 'foo' without
being authorized, and even without ever being known at C.
If anybody cares: exactly the same happens with DCCP.
This behavior 1st manifested in release 2.6.29.4 (see Fixes below)
and it looks unintentional. At least, no explanation was provided.
I changed returned packes label into the 'bar',
to bring it into line with the Smack documentation claims.
Metrics
Affected Vendors & Products
| Source | ID | Title |
|---|---|---|
Debian DLA |
DLA-4008-1 | linux-6.1 security update |
Ubuntu USN |
USN-7088-1 | Linux kernel vulnerabilities |
Ubuntu USN |
USN-7088-2 | Linux kernel vulnerabilities |
Ubuntu USN |
USN-7088-3 | Linux kernel vulnerabilities |
Ubuntu USN |
USN-7088-4 | Linux kernel vulnerabilities |
Ubuntu USN |
USN-7088-5 | Linux kernel vulnerabilities |
Ubuntu USN |
USN-7100-1 | Linux kernel vulnerabilities |
Ubuntu USN |
USN-7100-2 | Linux kernel vulnerabilities |
Ubuntu USN |
USN-7119-1 | Linux kernel (IoT) vulnerabilities |
Ubuntu USN |
USN-7123-1 | Linux kernel (Azure) vulnerabilities |
Ubuntu USN |
USN-7144-1 | Linux kernel (Intel IoTG) vulnerabilities |
Ubuntu USN |
USN-7154-1 | Linux kernel vulnerabilities |
Ubuntu USN |
USN-7155-1 | Linux kernel (NVIDIA) vulnerabilities |
Ubuntu USN |
USN-7156-1 | Linux kernel (GKE) vulnerabilities |
Ubuntu USN |
USN-7154-2 | Linux kernel (HWE) vulnerabilities |
Ubuntu USN |
USN-7194-1 | Linux kernel (Azure) vulnerabilities |
Ubuntu USN |
USN-7196-1 | Linux kernel (Azure) vulnerabilities |
Solution
No solution given by the vendor.
Workaround
No workaround given by the vendor.
Mon, 03 Nov 2025 23:30:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| References |
|
Fri, 20 Dec 2024 02:45:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| Weaknesses | CWE-287 | |
| Metrics |
threat_severity
|
threat_severity
|
Wed, 23 Oct 2024 16:45:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| First Time appeared |
Linux
Linux linux Kernel |
|
| Weaknesses | NVD-CWE-noinfo | |
| CPEs | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | |
| Vendors & Products |
Linux
Linux linux Kernel |
|
| Metrics |
cvssV3_1
|
cvssV3_1
|
Sat, 12 Oct 2024 01:15:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| References |
| |
| Metrics |
threat_severity
|
cvssV3_1
|
Thu, 10 Oct 2024 14:15:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| Metrics |
ssvc
|
Wed, 09 Oct 2024 14:15:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| Description | In the Linux kernel, the following vulnerability has been resolved: smack: tcp: ipv4, fix incorrect labeling Currently, Smack mirrors the label of incoming tcp/ipv4 connections: when a label 'foo' connects to a label 'bar' with tcp/ipv4, 'foo' always gets 'foo' in returned ipv4 packets. So, 1) returned packets are incorrectly labeled ('foo' instead of 'bar') 2) 'bar' can write to 'foo' without being authorized to write. Here is a scenario how to see this: * Take two machines, let's call them C and S, with active Smack in the default state (no settings, no rules, no labeled hosts, only builtin labels) * At S, add Smack rule 'foo bar w' (labels 'foo' and 'bar' are instantiated at S at this moment) * At S, at label 'bar', launch a program that listens for incoming tcp/ipv4 connections * From C, at label 'foo', connect to the listener at S. (label 'foo' is instantiated at C at this moment) Connection succeedes and works. * Send some data in both directions. * Collect network traffic of this connection. All packets in both directions are labeled with the CIPSO of the label 'foo'. Hence, label 'bar' writes to 'foo' without being authorized, and even without ever being known at C. If anybody cares: exactly the same happens with DCCP. This behavior 1st manifested in release 2.6.29.4 (see Fixes below) and it looks unintentional. At least, no explanation was provided. I changed returned packes label into the 'bar', to bring it into line with the Smack documentation claims. | |
| Title | smack: tcp: ipv4, fix incorrect labeling | |
| References |
|
|
Status: PUBLISHED
Assigner: Linux
Published:
Updated: 2025-11-03T22:20:23.105Z
Reserved: 2024-09-30T16:00:12.935Z
Link: CVE-2024-47659
Updated: 2024-10-10T13:23:34.501Z
Status : Modified
Published: 2024-10-09T14:15:07.660
Modified: 2025-11-03T23:16:13.753
Link: CVE-2024-47659
OpenCVE Enrichment
No data.
Debian DLA
Ubuntu USN