-
zt3phan
Hello sir's & sirette's!
-
zt3phan
I got a Q regarding SmartOS
-
zt3phan
Hence being a type-1 hypervisor, can you set it up to protect flashable mcu's/soc's from writing w/ tools like 'flashrom' etc.? does it do that out of the box, or how do you configure that? Looked thru documentation & can't find this either there or on websearches. I know Secureboot disallows it,though it can be overridden.
-
zt3phan
Also got another question regarding the LTS version (or any version), have any undergone code-auditation?
-
zt3phan
And third question i got,say i install a Linux-dist on top of Smartos where i want the virtualized O/S getting networking data "first" say thru a stateful,DPI firewall, can that be achieved? (All questions is to be understood from AMD-architecture)
-
zt3phan
And a smaller Q, can i by configuration restrict access to ioctl, ionice cmd's & syscalls or do i need like syzkaller etc. for that? What are recommended here?
-
duncan
zt3phan: The website has an example of a NAT zone which is a smartOS image. This can be used to handle outward-facing networking for all VMs/zones. I have done the exact same thing, but, with openBSD in a bhyve VM, instead of illumos.
-
zt3phan
duncan: thx. is it in the documentation or external site?
-
duncan
-
zt3phan
thx mate
-
zt3phan
sorry my screen died, did anyone happen to answer any above q's except duncan (much appreciated!)?
-
zt3phan
(while i was discon'ed ofc)
-
xmerlin
danmcd, are there any updates regarding the support for Broadcom 3816? ...I've seen the thread on -dev but haven't noticed any reference to stable support in the changelogs... am I mistaken?
-
danmcd
There are none as of yet.
-
danmcd
The patches are available, but I think it needs real testing.
-
danmcd
Someone from nexenta dropped the patches a while ago on illumos-dev. I made some small mods to it, and it probably needs to be filed, put in gerrit, etc.
-
danmcd
(Someone might've filed an illumos bug already?)
-
zt3phan
geez these timeouts..finally reg'ed to nickserv
-
xmerlin
:( I need to purchase a Dell server as it's the only option for the HBA. I need to replace a problematic Supermicro server.
-
bahamat
zt3phan: as far as things like flashing and hardware interface, those operations can be done from the administrative plane only (i.e., the global zone). Tenant instances are not permitted to interface with real hardware.
-
bahamat
oops, too late.
-
danmcd
xmerlin: Is this standalone smartos? Or a Triton node (and Compute or Head node if Triton?)?
-
zt3phan
ty bahamat, much appreciated
-
xmerlin
danmcd, standalone smartos
-
danmcd
I'll spin a 20240111 version with the 38xx in it. If you notice, there are Oct 2023 PIs in
kebe.com/~danmcd/webrevs/mpt_sas-38xx
-
danmcd
I'll update with 20240111 PIs.
-
xmerlin
danmcd, Thank you, when I receive the server, I will test the image
-
danmcd
Looks like I'd built PI, ISO, and USB; I'll do the same here. Expect something in <= 3 hours. (And expect the timestamp to be 20240118, but it's just 20240111 + 38xx support.)
-
danmcd
When do you think that'll arrive xmerlin? I ask because I'm tempted to land this support into SmartOS now, but I don't have 38xx HW to test it with.
-
danmcd
(IOW, your test results would be vastly appreciated.)
-
xmerlin
danmcd, I'll let you know as soon as I get a confirmed delivery date
-
danmcd
This is a Dell... is it the HBA-only 38xx? Or is the MegaRaid, which might be supported by `lmrc` ?
-
danmcd
(Actually, use the one I spin; lmrc is in -gate, but 38xx for mpt_sas isn't; you win either way.)
-
xmerlin
danmcd, hba only HBA355i
-
xmerlin
-
xmerlin
first column
-
zt3phan
What you recommend for hardening the SmartOS?
-
danmcd
@xmerlin --> uploaded. Look for platform-20240118T163954Z*
-
zt3phan
I checked out devsec's ansible roles, seems good. Any other tip's?
-
danmcd
zt3phan: Hardening against what exactly? I saw you mention FW flashes. Also, what's you're threat environment? Adversarial users on a cloud environment? Public-Internet exposure?
-
danmcd
(And I'll note that at some spaces I won't have enough knowledge to answer your questions.)
-
zt3phan
i check the server-logs in between not to miss anything. Public inet, phones gettin' hacked etc. the latest year.
-
duncan
One thing I never could work out was why rpcbind runs in the global zone ;)
-
xmerlin
danmcd, thank you
-
duncan
Still wondering :(
-
zt3phan
-
duncan
It seems to be an Illumos thing because it's enabled by default on OI and OmniOS as well
-
zt3phan
dancmd: yes the common stuff this hackergroup do is flash i2c/SPI mcu's (or what else they can flash), and put microkernels w/ FreeRTOS variant with included malware-kit spreading like wildfire. I transparent-proxied and found their dumpsites etc, really competent .ch based group.
-
zt3phan
So i'm looking to defend in all possible ways.
-
zt3phan
*sigh* timeouts,timeouts..
-
danmcd
I think bahamat stated it well; non-global zones (NGZs) should be safe against hardware-interface attacks as NGZs can't access hardware without explicit hard-to-do configuration.
-
zt3phan
sounds great.
-
bahamat
zt3phan: I think you missed what I said earlier, so i'll repost it:
-
bahamat
zt3phan: as far as things like flashing and hardware interface, those operations can be done from the administrative plane only (i.e., the global zone). Tenant instances are not permitted to interface with real hardware.
-
danmcd
If your attacker has access to the global zone (GZ), it's either bad configuration or an NGZ-escape. NGZ-escapes are high-priority bugs.
-
danmcd
Yes ^^^
-
bahamat
zt3phan: SmartOS doesn't generally need additional hardening, because it's hardened by default.
-
zt3phan
okay, so i should avoid devsec os-hardening?
-
bahamat
In fact, when Joyent was purchased by Samsung, they sent in their SecOps folks to provide recommended hardening guidelines, and we already met or exceeded every measure.
-
zt3phan
i c :D
-
zt3phan
has there been a code-audit at any version by a third-party?
-
bahamat
I'm happy to discuss SmartOS's security and threat model, and we're always open to constructively examining potential improvements.
-
bahamat
No. But it's 100% open source and all code is available for audit.
-
zt3phan
and another thing, even though i plan to run on AMD-SEV im wondering if SmartOS encrypts itself to memory?
-
bahamat
We even have an open Jenkins instance where builds can be observed by 3rd parties.
-
bahamat
No, it doesn't encrypt itself to memory. Doing so is effectively impossible. At the end of the day, there must be unencrypted runtime data in memory in order to perform compute on it.
-
zt3phan
allright, yes i saw that, thou like Zephyr-RTOS 2.7.x LTS are code-audited officially.
-
bahamat
But we do support encrypted zpools. It's intended for use in the context of Triton, but it can still be done on SmartOS standalone if you add some additional components to it.
-
zt3phan
just small wondering of mine.
-
bahamat
E.g., the decryption key source is intended to be kbmapi that runs on the headnode. For standalone you need to provide your own key source.
-
bahamat
Any operating system that claims to be encrypted in memory is either playing word games or is outright lying.
-
zt3phan
So, in regards on the kernel, does it use a shadowstack or?
-
bahamat
No, we use a different mechanism called stack smashing protection.
-
zt3phan
i see.
-
bahamat
It's much more efficient than shadowstack.
-
rmustacc
They're diffrent mechanisms actually.
-
rmustacc
The shadowstack is usually part of CFI protections in the CPU.
-
rmustacc
That's pretty orthogonal to stack smashing protection tbh.
-
bahamat
Yeah, but I mean that both are intended to mitigate buffer overflows.
-
bahamat
We don't use shadowstack to prevent buffer overflow, we use SSP, which is entirely different, but is still buffer overflow protection.
-
rmustacc
Yeah, but we do want to have both some day.
-
rmustacc
(in illumos at least)
-
zt3phan
Mhm yeah..do you adopt any own "grsec"-stuff, but of your own? I know they really invented much of the stuff used today, it's standardized & the other non-free, so what im asking is if you wrote any own of it, besides rbac?
-
bahamat
Well, not being Linux we can't use grsec. And we do have several security features. It's best to discuss individual threats and mitigates rather than lump everything together by saying grsec-like.
-
bahamat
What is considered grsec-like will vary greatly from person to person.
-
zt3phan
PaX?
-
zt3phan
kernel lockdown?
-
bahamat
I think so.
-
bahamat
kernel lockdown no, but tenant instances don't have access to anything that would need locking down.
-
zt3phan
ah yeah, i suppose. gotta ask since i never used bhyve - what are the pros/cons vs kvm?
-
danmcd
BHYVE has a lot more modern support and active development.
-
bahamat
bhyve is an all original vmm created by FreeBSD.
-
bahamat
When comparing FreeBSD vs Linux KVM, there may be various points made by each side.
-
bahamat
For illumos/SmartOS bhyve is a better choice for us.
-
danmcd
^^^
-
zt3phan
in security context, what would you say?
-
bahamat
KVM is GPL, which there are differences of opinion on how relevant that is.
-
danmcd
At first glance, no differences, but I will say that since the KVM is an older fork and BHYVE is an ongoing care-and-maintenance project, you're less likely to find old bugs in BHYVE.
-
danmcd
And when I say "KVM" I mean "the KVM used in SmartOS and other illumos distros."
-
bahamat
We have a better working relationship with FreeBSD, so changes from bhyve made by us or them flow pretty freely, whereas we had a lot of difficulty upstreaming KVM changes.
-
danmcd
KVM in Linux is under development too, but none of that was pulled into the illumos kvm.
-
danmcd
And @bahamat nails the other reason.
-
bahamat
On SmartOS, both KVM and Bhyve run inside a zone with stripped down permission.
-
danmcd
Yes, the "double-hulled" virtualization.
-
bahamat
So even if there is say, a vm breakout vulnerability in kvm or bhyve, the place you broke into is actually a smaller, more secure prison.
-
danmcd
Even if BHYVE or KVM is escaped, you then have to escape a non-global zone if you want to do real damage.
-
bahamat
kvm/bhyve brand zones are restricted from doing things like forking, reading files, listening on the network, sending packets, etc.
-
bahamat
To truly break out of an HVM on SmartOS you first need to escape the vmm, then defeat the capabilities restrictions in the zone brand, then have a zone escape.
-
zt3phan
i understand.
-
bahamat
Also, a guest running in HVM is free to implement their own security protocols, which could include installing grsec, adding another entire layer of mitigations that need to be defeated.
-
bahamat
It would probably be pretty easy for operators to use our image creation process and add on grsec for every image, so that your own tenants always have it installed by default.
-
zt3phan
If i setup a zone w/o any specified rules, do the root user on guest vm still able to do ioctl for instance?
-
zt3phan
bahamut, ofc i understand that.
-
bahamat
So, technically yes, but that doesn't allow them to do just anything.
-
bahamat
There are a lot of things that use ioctl to perform various permitted tasks.
-
bahamat
But root in a non-global zone can't use ioctl to do anything malicious to the global zone.
-
zt3phan
right right, but by advanced evasion techniques, do you know any case a breach have been done thouroughly?
-
bahamat
There have been zone breakout issues in the past. There are currently no known methods for escaping a zone.
-
zt3phan
okay.
-
zt3phan
gotta check cve's i guess.
-
bahamat
If such an issue were discovered or reported, it would receive the highest priority for fixing it.
-
zt3phan
sounds good to me, notice you update very frequent.
-
bahamat
Yeah, we have biweekly releases, and if there are security critical issues we will publish updates out of cycle as needed.
-
bahamat
Our advisories are published here:
security.tritondatacenter.com
-
zt3phan
have you ever thought of the possibility to run S-Os on like an SoC or from disk?
-
bahamat
And we send announcements to smartos-discuss@ or sdc-discuss@ as necesary.
-
zt3phan
thank you,bahamut
-
bahamat
Running on an SoC would depend on the architecture of the device.
-
bahamat
If there were an x86_64 SoC system and we had driver support for everything, then it should work no problem.
-
bahamat
We don't currently run on ARM or RISC-V.
-
zt3phan
like FPGA for AMD?
-
bahamat
There's some work going on to run on ARM, but even once that's incorporated into illumos there is some upstack stuff we'd need to do to make sure that SmartOS works well in that context.
-
zt3phan
that requires ofc a microkernel and diff install-method
-
bahamat
Well illumos isn't a microkernel.
-
bahamat
And there isn't really an install method. You just boot the platform image.
-
zt3phan
but that could be done via kconfig'ing and only have the platform-specific's,right?
-
zt3phan
"install"
-
bahamat
Where that image is stored can vary. It can even be stored on locally attached disks, but that's not really the same as "installing" the OS like you would with Linux, *BSD, or even OmniOS.
-
zt3phan
something like that
-
bahamat
FYI, we're having our office hours on Discord, so my replies may not be as prompt until that's over.
-
zt3phan
if you look at the approach Zephyr-rtos takes, they offer support to ESP etc, dunno if you looked at their project.
-
zt3phan
(?)
-
bahamat
If you're interested, the discord is
discord.gg/rgkeBVRw
-
bahamat
I haven't particularly looked at zephyr, though I'm aware of the project.
-
zt3phan
bahamut, that's good to know. i can't get into discord on the device im on.
-
bahamat
No worries. I felt it might be rude to mention that I was participating in a public forum elsewehere, but not provide the link :-)
-
zt3phan
they use platform-specfic builds to the kernel upon "installation", thou it is'nt really 'easy' to use.
-
bahamat
Oh, no I don't think we'd use something like that.
-
bahamat
Our infrastructure makes the running system auditable because it can be cross referenced against known approved images.
-
zt3phan
that's where SmartOS actually got my attention, plus the image-type system looks great.
-
bahamat
The boot image hash is verified, and it includes a manifest of all objects and their hashes shipped in the platform image.
-
zt3phan
and i need some more knowledge to illumos also, all bsd stuff always been rigid
-
bahamat
We don't have explicit tooling for "please verify the running system", but a knowledgable operator can perform those checks manually.
-
zt3phan
can you use TPM directly from the SmartOS?
-
zt3phan
tpm2.0*
-
zt3phan
didnt see it in pkgs
-
jbk
no
-
jbk
there currently isn't a driver
-
jbk
or the tpm driver currently only supports the older tpm1.2 devices
-
zt3phan
really?
-
zt3phan
How do i deal w/ that, from guest-vm?
-
jbk
you'd never really want to pass through a HW tpm though
-
zt3phan
for secure boots,yes? or why not?
-
jbk
because the state of the hw tpm isn't going to be correct for secure boot
-
jbk
upstream bhyve added some hooks for supporting virtual tpms, not sure if they've made it back yet
-
jbk
(then would need to do a bit of wiring up)
-
zt3phan
if you sign the illumos-kernel?
-
zt3phan
would'nt that be wanted?
-
zt3phan
or what you mean state incorrect?
-
jbk
still.. the problem is secure boot is kinda like a blockchain.. order matters
-
jbk
each bit hashes the next thing
-
jbk
so each step compares the values to known values to determine if things are 'ok'
-
zt3phan
i''m not 100% on the tpm, but verifying the kernel & then firmware..? or do you mean the boot-process of a usb?
-
duncan
Verified boot systems typically have a root of trust, TPM, which signs the rest. Passing through the TPM to a VM wouldn't guarantee anything about the VM, and might have implications for the host
-
duncan
E.g. on Chromebooks, the Google TPM (firmware of which is OSS BTW) signs vboot stuff (it's a coreboot thing), the coreboot payload (depthcharge bootloader) then uses things like dm-verity to verify filesystem from which the system is to be booted
-
duncan
The other main use of a TPM is to store secrets, you probably don't want these to be shared between the host and VMs
-
jbk
the other wrinkle I suppose is that hardware TPMs usually live behind a PCI-LPC bridge (more or less an ISA bus) which bhyve doesn't have pass-thru support unless I suppose you did the entire bus
-
jbk
which would probably grab several other things on the system
-
zt3phan
so the booted vm still is completely isolated by the illumos kernel, then protection of that should only be of interest, because the vm's could be compromised and thus needing to be scrapped, main importance the illumos-kernel is intact? but i suppose your entirely right as i don't have your expertise..
-
bahamat
zt3phan: So for the context of instances, an instance is a zfs clone of an image, which itself is a zfs dataset. These come with all of the protections for data integrity built into ZFS. Image hashes are verified before importing, and can be cross referenced with images available publicly.
-
bahamat
So if your question is how can you know that the image you're running is the image you think you're running, there are already strong protections and cross references against publicly verifiable data that can be used to verify this.
-
bahamat
As far as ensuring the platform image you're running is the image you think you're running, I already discussed that above.
-
zt3phan
no, i mainly wanted to use TPM as it includes other protections, again where writelocks to specific mcu's lie..
-
bahamat
Neither of these use hardware enforcement, so if you have a hard requirement on TPM that's something that will be a concern.
-
zt3phan
yes i see.
-
bahamat
But in lieu of hardware enforcement, we do already have some strong verification mechanisms in place.
-
zt3phan
right.
-
zt3phan
Anyway, its mainly the communication (driver) with the chip that's the main issue atm, do you know if any work is being done on that?
-
zt3phan
is that correct btw?
-
duncan
If someone wanted to replace all the firmware on your computer, lack of driver is not going to be a problem
-
duncan
But you realise how difficult and targeted that would be, right?
-
zt3phan
>.<
-
zt3phan
yea..
-
zt3phan
anyway, my last Q i got, is the system you currently use built on pre-built, specific images of guest-OS'es or can i use any OS as long as i dump it to an image and sign it? if the former i'd like a url to see the images available.
-
bahamat
We provide images of popular guests, but you can also create your own instances from scratch, and even perform the install from some media.
-
jbk
there's a mostly working tpm2 driver under development, just not finished yet
-
zt3phan
bahamut, thanks yet again & thanks to jbk, duncan & dancmd for your time and answers! i'll be idling here some and go thru documentation thoroughly before i get into this project, which im pretty confident i will. & pleased to meet ya'll, ttyl! :)
-
jbk
still needs TAB support and testing w/ TPMs that use CRB for it's interface, and more testing in general
-
zt3phan
i c, jbk. thx. looking forward to it. if you got any url you think i should go for besides the official site & github, please don't hesitate to throw it :)
-
jbk
unfortunately, i don't have an easy way to distribute an image w/ the driver
-
jbk
if you're adventureous to build your own smartos image,
github.com/jasonbking/illumos-gate/tree/tpm2-squashed should have it (though it's based on a slightly older smartos release, so you'd want to rebase it)
-
jbk
though it's still a work in progress, so treat accordingly.. it may not work on your system, or may cause a kernel panic (hopefully not, but so far just been tested on a few systems)
-
jbk
oh hrm.. looking at that branch, i haven't squashed down the most recent stuff...
-
jbk
there updated
-
zt3phan
just had a look at jasonking's git & also noticed hardenedbsd (which is based on illumos) got tpm2 working, but i dunno if it's of any use to you, as there is prolly more implications i suspect(?)
-
zt3phan
im not that adventureous as of nowm but in near future i could make an attempt.
-
zt3phan
now*
-
duncan
hardenedbsd is a FreeBSD derivative
-
zt3phan
!
-
zt3phan
this is why i need to get more into the bsd-world. xD
-
duncan
well it's called hardenedBSD for a reason
-
zt3phan
netbsd,openbsd,freebsd..it's a bit confusing, which actually makes a linux-lowlife like me think they're kinda-the-same ;p
-
zt3phan
read on the illumos-gate NVMe topo-node is'nt complete either in terms of tracking temp,health etc...anyone heard there are any other troubles w/ NVMe disks & running S-OS guest on 'em?
-
zt3phan
ah yes, there was another thing i was thinking about. when the vm_guest is running i suppose there is a syscall-fuzzing, how does that approach look? do i need to do the fuzz on my own?
-
zt3phan
how tedious w/ timeouts...gotta get a real client, but i'll read the logs on the website in topic if anyone wanna answer the above at any point, thanks in advance <3
-
neuroserve
zt3phan : log.omnios.org
-
xmerlin
Are there any recommendations for BIOS settings in new generation servers? I typically disable all energy savings and set everything to maximum performance. However, what do you suggest for settings like 'MADT Core Enumeration: linear or round robin,' 'NUMA Nodes Per Socket: 0/1/2/4,' 'Enhanced REP MOVSB/STOSB: enable or disable,' 'Fast Short REP MOVSB: enable or disable,' and 'REP-MOV/STOS Streaming: enable or disable'?
-
jbk
ISTR (though could be confusing things) the MOV* settings might be related to hw vulnerabilities (side channels I think)
-
jbk
so it probably depends on what you plan to run on the system.. if it's multi-tenant or untrusted stuff
-
jbk
might not want it enabled