Zum Hauptinhalt springen
Intelligence View
⚡ tsecurity.de Intelligence

Full Labels over Loopback with CIPSO

Perhaps one of the largest shortcomings of the CIPSO network labeling protocol when used with SELinux is the fact that it can only convey the SELinux MLS…

Beitrag
0
Seite
0
↗ Quelle (paul-moore.com)
Cloud & Tech-Stack · 4 Min. Lesezeit
Quelle: paul-moore.com
Rubrik: Server Unix e Linux

Perhaps one of the largest shortcomings of the CIPSO network labeling protocol
when used with SELinux is the fact that it can only convey the SELinux MLS
attributes across the network. There are plenty of good reasons for this:
strict conformance with protocol specification, limited space in the IPv4
header, interoperability with non-SELinux systems, etc. However, regardless of
the reasons why, there will always be use cases where it would be very nice to
have the full SELinux label without the performance, scalability and management
overhead of labeled IPsec. While I can’t say I have solution for all of those
use cases, today I am going to let you in on one of NetLabel’s best kept
secrets: NetLabel and CIPSO can convey the full SELinux label over local
connections, and it has been able to do so for years.



Now, before I got into the details of “how”, I just want to be clear that what
I’m about to tell you isn’t really a secret, it just hasn’t been very well
publicized. After all, I’m not sure how it could be a secret when the code is
available for anyone and everyone to review and inspect. Further, the “how” is
even documented in the netlabelctl manpage, so if this capability is NetLabel’s
best kept secret it has clearly been hiding in plain sight.



Enough of the “secret”, let’s explain how to get this working. First off, if
you’re going to try this on your own system (any modern Linux distribution that
supports SELinux and NetLabel should work), you might want to grab a copy of
the getpeercon_server test tool that I’ve used in the example below;
instructions for building the test tool are at the top of the file. Once you’ve
got everything built and you’ve verified that your SELinux and NetLabel
installation is working as you would expect, you need to start off by
configuring the CIPSO Domains Of Interpretation (DOI). For this example we are
going to create two DOIs, one using the standard, MLS-only passthrough type and
the other using the local-connection-only full SELinux type. Don’t forget that
you can always check the netlabelctl manpage for more information on the
commands below.



# netlabelctl cipsov4 add pass doi:1 tags:1
# netlabelctl cipsov4 add local doi:2
# netlabelctl -p cipsov4 list
Configured CIPSOv4 mappings (2)
DOI value : 1
mapping type : PASS_THROUGH
DOI value : 2
mapping type : LOCAL

After you’ve setup the CIPSO DOI’s you need to configure NetLabel to send
traffic using these new DOIs. In our example we are going to configure the
system such that traffic sent to 127.0.0.1 (localhost) will use DOI #2, the
local-only full SELinux label DOI, and traffic sent to 10.250.2.92 (the
system’s eth0 address) will use DOI #1, the normal MLS-only DOI. Don’t forget
that we first need to remove the default unlabeled mapping so we can use the
address selectors.



# netlabelctl map del default
# netlabelctl map add default address:0.0.0.0/0 protocol:unlbl

# netlabelctl map add default address:::/0 protocol:unlbl
# netlabelctl map add default address:127.0.0.1 protocol:cipsov4,2
# netlabelctl map add default address:10.250.2.92 protocol:cipsov4,1
# netlabelctl -p map list
Configured NetLabel domain mappings (1)
domain: DEFAULT
address: 127.0.0.1/32
protocol: CIPSOv4, DOI = 2
address: 10.250.2.92/32
protocol: CIPSOv4, DOI = 1
address: 0.0.0.0/0
protocol: UNLABELED
address: ::/0
protocol: UNLABELED

With that we’re finished, now it’s time to test it out. Testing is quite
simple, make sure you have a TCP client like telnet or netcat installed and
then start the getpeercon_server test tool you built earlier; in this example
getpeercon_server is listening on TCP port 5000.



# ./getpeercon_server 5000
-> running as unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
-> creating socket ... ok
-> listening on TCP port 5000 ... ok
-> waiting ... connect(10.250.2.92,system_u:object_r:netlabel_peer_t:s0)
Connected to 10.250.2.92:5000
-> connection closed
-> waiting ...
connect(127.0.0.1,unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023)
Connected to 127.0.0.1 5000
-> connection closed
-> waiting ...

It works! When we connected to 10.250.2.92 we saw the familiar
“netlabel_peer_t” type, but when we connected to 127.0.0.1 we saw the full
SELinux label of our telnet client process,
“unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023”. Go ahead and try it
out for yourself, just remember that you can only use the “local” DOI type on
network connections that run over the loopback network interface.

Social ReaktionenReagiere als Erste:r — dein Feedback zählt!
Informations-Bewertung:
✏️ Information ergänzen
🛡️ Versioniert via CMS-Revisions-Engine (Freigabe-Queue für Gäste)

💬 Discussione della community e commenti

🌐 Entra nella chat principale

Avvia la discussione nel flusso broadcast della Social Chat oppure invia qui sopra un contributo esperto tramite il modulo di integrazione.

Briefing di sicurezza Gratuito · disdetta in 1 clic

Intelligence Digest — gratuito

Ogni giorno le notizie di sicurezza più importanti · annullabile in qualsiasi momento

Valutazione della community & prova sociale
⭐ Giudizio dei lettori
–
Ø / 5.0
Ancora nessuna valutazione dei lettori
Questo articolo ti è stato utile?
0
Lascia ora la tua valutazione
Valutazione dettagliata (facoltativa)
Contenuto & qualità
Fonte & credibilità
Attualità

Cluster di storie correlate & fonti (IA vettoriale)

6 Cluster
26 fonti
Black Friday Oura Ring deals: The best of the deals so far, picked by a wearable-tech expert
Latest from TechRadar 29 min. fa
25 altre fonti
CNET6 anni faOur Favorite Blenders of 2026 Are on Sale Ahead of Black Friday CNET33 min. faBrighten Up Your Day by Saving 20% Off Flashlights With Olight’s Black Friday Sale CNET25 min. faLive: Black Friday Deals Are Here. Shop Expert Picks Across Tech, Everyday Essentials and More at Up to 60% Off Golem.de39 min. faAnzeige: Logitech-Tastatur MX Keys S am Black Friday zum Sensationspreis auf Amazon PC-WELT51 min. faLuminar zum Black Friday: KI-Bildbearbeitung für nur 79,20 Euro Latest from TechRadar1 h faThis is the pair of open earbuds to hunt down over Black Friday Latest from TechRadar1 h faBest AirPods Black Friday deals: all live savings on AirPods Pro 3 and more Computer Bild1 h faPhilips Sonicare DiamondClean 9000 zum Black Friday günstiger netzwelt.de2 h faESR startet mit Black-Friday-Rabatten: Diese AirPods-Hüllen lohnen sich jetzt netzwelt.de2 h faPlayStation 5 geschenkt: Diese Black-Friday-Aktion legt die Konsole gratis obendrauf netzwelt.de2 h fa6 Dyson-Staubsauger im Vergleich: Dieser Sauger wird am Black Friday überraschend zum Preis/Leistungssieger netzwelt.de1 h faMonitore im Angebot zum Black Friday: Gutes Bild für Office, Gaming und mehr Golem.de1 h faAnzeige: Akkuschrauber mit 20 Bits zum Black Friday erstmals unter 50 Euro bei Amazon PC-WELT1 h faDie günstigsten Handytarife an Black Friday von 10 GB bis Unlimited: Hier lohnt sich ein Wechsel PC-WELT1 h faBlack Friday 2026 bei LiberNovo: Ergonomische Bürostühle mit bis zu 44 Prozent Rabatt Latest from TechRadar1 h faThe best Black Friday robot vacuum deals: Dreame, Shark, Dyson, and Roborock Golem.de1 h faAnzeige: Topdon-Starthilfe-Powerbank für Kfz zum Black-Friday-Bestpreis nur rund 85 Euro heise online News1 h faBlack Friday: Die besten Kopfhörer zum Tiefstpreis – Sonos Ace, Nothing & Shokz Latest from Windows Central1 h faDell's Black Friday deals drop major savings on Alienware OLED monitors CNET2 anni faMake Every Night Game Night and Save $90 on the Nex Playground With This Black Friday Deal DEV Community1 h faThe app is part of the gadget: 14,000 App Store reviews of 28 device apps before Black Friday Latest from TechRadar2 h faBlack Friday tech deals under $100 / £100: Fire TV Sticks, earbuds, coffee machines and more Caschys Blog3 h faGoogle One: Black-Friday-Angebot mit bis zu 50 Prozent Rabatt netzwelt.de3 h faDem Testsieger ebenbürtig: Zum Black Friday stürzt Xiaomis stärkster E-Scooter im Preis ab Macerkopf.de3 h faFotos verbessern mit Aiarty: 52 % Rabatt + Gratisgeschenke zum Black Friday
Articoli simili
🔍 Verwandte News

Auch interessante Nachrichten Full Labels over Loopback with CIPSO

Thematisch verwandte Begriffe: Full, Labels, over, Loopback · 6 Treffer

Laden...

Caricamento dei video ...

Laden...

Caricamento degli articoli ...

Laden...

Caricamento dei video ...

Laden...

Caricamento degli articoli ...

Laden...

Caricamento dei video ...

Laden...

Caricamento degli articoli ...

Laden...

Caricamento dei video ...

Laden...

Caricamento degli articoli ...

Laden...

Caricamento dei video ...

💬 Caricamento dei commenti…
Trascina per aggiornare
Widgets & Topics
Loading widgets…
Nächster Beitrag