[ 0.208536] ** This system shows unhashed kernel memory addresses **
[ 0.208536] ** via the console, logs, and other interfaces. This **
Buongiorno Lista,[ 0.208536] ** This system shows unhashed kernel memory addresses **
Vuol dire che i messaggi del kernel mostrano gli indirizzi interni
invece di una "hash" degli stessi (ma solo se il driver usa "%p" per
stampare il puntatore, invece che le normali stringhe testuali.
Per esempio in caso di oops o panic.
[ 0.208536] ** via the console, logs, and other interfaces. This **
Appunto, i messaggi.
Questo quadratozzo di NOTICE sta in lib/vsprintf.c nei sorgenti del kernel, da cui vedo che dipende dal parametro "no_hash_pointers".
Guardando /proc/cmdline si dovrebbe vedere la presenza di questaIn /boot/grub/grub.cfg non ho trovato quel parametro.
opzione, che si puo` togliere nella configurazione del boot loader.
Io, che sono vecchio e rinco, non vedo 'sto gran problema di
sicurezza, e da sviluppatore preferisco di gran lunga i numeri
veri. Ma oggi non si possono minimizzare potenziali minacce senza
sembrare rinco (appunto!) quindi forse andrebbe tolta l'opzione.
Il dubbio che rimane e` perche` qualcuno ha messo quel parametro,
che serve solo a chi fa debug sul kernel. Da me non c'e` :)
Comunque tra ricerche in rete e/o "git blame" sui sorgenti, e` spiegato tutto.
saluti
/alessandro
Io ho trovato questo nel mio /proc/cmdline BOOT_IMAGE=/boot/vmlinuz-6.1.0-9-amd64 root=UUID=880d6880-906e-49a6-8e72-bef089ab837e ro kaslr pti=on
slab_nomerge page_poison=1 slub_debug=FPZ nosmt
pinguino ha scritto:Buongiorno Lista,
Io ho trovato questo nel mio /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-6.1.0-9-amd64
root=UUID=880d6880-906e-49a6-8e72-bef089ab837e ro kaslr pti=on
slab_nomerge page_poison=1 slub_debug=FPZ nosmt
ma hai seguito qualche quida di hardening?
Se hai fatto un'installazione standard non dovresti avere tutti quei parametri
cercando in rete:
1) kaslr
kASLR is enabled by default in the Debian kernel since 4.7~rc7-1~exp1 (CONFIG_RANDOMIZE_BASE and CONFIG_RANDOMIZE_MEMORY) so there is no need to enable it with a specific kernel parameter.
infatti se fai:
$ grep "CONFIG_RANDOMIZE_BASE\|CONFIG_RANDOMIZE_MEMORY" /boot/config-$(uname -r)
CONFIG_RANDOMIZE_BASE=y
CONFIG_RANDOMIZE_MEMORY=y
CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING=$(Valore)
quindi questo parametro è inutile poiché già abilitato di default
2) pti=on
enables kernel page-table isolation
$ grep CONFIG_PAGE_TABLE_ISOLATION /boot/config-$(uname -r) CONFIG_PAGE_TABLE_ISOLATION=y
anche in questo caso il parametro è inutile perché già attivato
3) slab_nomerge
Disables the merging of slabs of similar sizes. Many times some obscure slab will
be used in a vulnerable way, allowing an attacker to mess with it more or less
arbitrarily. Most slabs are not usable even when exploited, so this isn't too big
of a deal. Unfortunately the kernel will merge similar slabs to save a tiny bit of
space, and if a vulnerable and useless slab is merged with a safe but useful slab,
an attacker can leverage that aliasing to do far more harm than they could have
otherwise. In effect, this reduces kernel attack surface area by isolating slabs
from each other. The trade-off is a very slight increase in kernel memory utilization. slabinfo -a can be used to tell what the memory footprint increase
would be on a given system.
$ grep SLAB /boot/config-$(uname -r)
# SLAB allocator options
# CONFIG_SLAB is not set
CONFIG_SLAB_MERGE_DEFAULT=y
CONFIG_SLAB_FREELIST_RANDOM=y
CONFIG_SLAB_FREELIST_HARDENED=y
# end of SLAB allocator options
questo, da quanto deduco, dovrebbe avere un effetto diverso da quanto previsto
nel Linux di default Debian
4) page_poison=1
clear the page allocator to prevent use-after-free attacks
$ grep CONFIG_PAGE_POISONING /boot/config-$(uname -r)
CONFIG_PAGE_POISONING=y
anche questo è inutile poiché già attivato
5) slub_debug=FPZ
Enables sanity checks (F) and redzoning (Z). Sanity checks are self-evident and
come with a modest performance impact, but this is unlikely to be significant on
an average Tails system. The checks are basic but are still useful both for security and as a debugging measure. Redzoning adds extra areas around slabs that
detect when a slab is overwritten past its real size, which can help detect overflows. Its performance impact is negligible.
An additional note: any time slub_debug= is put in the kernel command line, slab_nomerge is implied. But having slab_nomerge explicitely declared can help
prevent regressions where disabling of debugging features is desired but re-enabling of merging is not.
come indicato sopra questo dovrebbe far qualcosa di diverso, però non so se funziona dato che
# CONFIG_SLAB is not set
6) nosmt
disables SMT
questo, se ho interpretato correttamente, disabilita l'SMT (Simultaneous MultiThreading), ma fare questo ha forti impatti prestazionali.
La sua disabilitazione permette di evitare che i bug hardware collegati ad esso
possano essere sfruttati.
Penso che questi parametri li hai abilitati in /etc/default/grubIn /etc/default/grub.d/01_hardening.cfg ho trovato questo : GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT kaslr pti=on slab_nomerge page_poison=1 slub_debug=FPZ nosmt"
per saperne di più:Ok. Lo leggo.
$ man kernel-command-line
https://www.kernel.org/doc/html/
Io sconsiglio di applicare a caso qualcosa trovato su un articolo o su qualche
guida generica, senza essersi informati per avere almeno un'idea generica di quello che si sta facendo e verificare se sulla propria Debian è già abilitato
o meno e che effetti ha con il resto della configurazione in essere.
Ciao
Davide
--
La mia privacy non è affar tuo
https://noyb.eu/it
- You do not have my permission to use this email to train an AI -
Non ho seguito guide di hardening.
Soltanto questa sulla sicurezza Debian. https://www.debian.org/doc/manuals/securing-debian-manual/,
per Debian 12.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 297 |
Nodes: | 16 (2 / 14) |
Uptime: | 12:09:43 |
Calls: | 6,666 |
Files: | 12,214 |
Messages: | 5,336,445 |