smack: tcp: ipv4, fix incorrect labeling
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 07feee8f812f7327a46186f7604df312c8c81962 · < 4be9fd15c3c88775bdf6fa37acabe6de85beebff| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel’s Smack labeling of TCP/IPv4 connections can assign returned packets the connecting peer’s label instead of the listener’s label. A remote peer that connects to a Smack-labeled listener can receive packets that let the listener write to the peer’s label without authorization. No user interaction is described.
Engineers running Linux kernels with Smack enabled should check their exposure; the issue first appeared in release 2.6.29.4, and no fixed versions are provided.