11:45:49 Hello sir's & sirette's! 11:46:08 I got a Q regarding SmartOS 11:50:35 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. 11:52:05 Also got another question regarding the LTS version (or any version), have any undergone code-auditation? 11:56:38 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) 12:38:44 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? 13:51:26 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. 13:57:17 duncan: thx. is it in the documentation or external site? 13:59:09 https://docs.smartos.org/nat-using-etherstubs/ 14:04:37 thx mate 14:56:23 sorry my screen died, did anyone happen to answer any above q's except duncan (much appreciated!)? 14:57:03 (while i was discon'ed ofc) 16:11:08 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? 16:11:23 There are none as of yet. 16:11:32 The patches are available, but I think it needs real testing. 16:12:00 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. 16:13:12 (Someone might've filed an illumos bug already?) 16:14:15 geez these timeouts..finally reg'ed to nickserv 16:15:46 :( I need to purchase a Dell server as it's the only option for the HBA. I need to replace a problematic Supermicro server. 16:20:19 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. 16:21:17 oops, too late. 16:24:26 xmerlin: Is this standalone smartos? Or a Triton node (and Compute or Head node if Triton?)? 16:25:38 ty bahamat, much appreciated 16:30:01 danmcd, standalone smartos 16:32:42 I'll spin a 20240111 version with the 38xx in it. If you notice, there are Oct 2023 PIs in https://kebe.com/~danmcd/webrevs/mpt_sas-38xx 16:32:50 I'll update with 20240111 PIs. 16:35:44 danmcd, Thank you, when I receive the server, I will test the image 16:38:20 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.) 16:41:36 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. 16:41:47 (IOW, your test results would be vastly appreciated.) 16:42:41 danmcd, I'll let you know as soon as I get a confirmed delivery date 16:43:26 This is a Dell... is it the HBA-only 38xx? Or is the MegaRaid, which might be supported by `lmrc` ? 16:43:47 (Actually, use the one I spin; lmrc is in -gate, but 38xx for mpt_sas isn't; you win either way.) 16:43:50 danmcd, hba only HBA355i 16:44:24 -> https://dl.dell.com/topicspdf/hba355_ug_en-us.pdf page 9 16:44:34 first column 18:02:37 What you recommend for hardening the SmartOS? 18:02:38 @xmerlin --> uploaded. Look for platform-20240118T163954Z* 18:03:31 I checked out devsec's ansible roles, seems good. Any other tip's? 18:03:37 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? 18:04:00 (And I'll note that at some spaces I won't have enough knowledge to answer your questions.) 18:05:11 i check the server-logs in between not to miss anything. Public inet, phones gettin' hacked etc. the latest year. 18:05:15 One thing I never could work out was why rpcbind runs in the global zone ;) 18:05:20 danmcd, thank you 18:05:26 Still wondering :( 18:05:43 i checked out https://galaxy.ansible.com/ui/repo/published/devsec/hardening/content/role/os_hardening/ 18:06:01 It seems to be an Illumos thing because it's enabled by default on OI and OmniOS as well 18:10:13 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. 18:10:59 So i'm looking to defend in all possible ways. 18:16:51 *sigh* timeouts,timeouts.. 18:19:30 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. 18:20:11 sounds great. 18:20:20 zt3phan: I think you missed what I said earlier, so i'll repost it: 18:20:24 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. 18:20:24 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. 18:20:38 Yes ^^^ 18:20:48 zt3phan: SmartOS doesn't generally need additional hardening, because it's hardened by default. 18:21:21 okay, so i should avoid devsec os-hardening? 18:21:43 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. 18:22:04 i c :D 18:22:45 has there been a code-audit at any version by a third-party? 18:22:52 I'm happy to discuss SmartOS's security and threat model, and we're always open to constructively examining potential improvements. 18:23:28 No. But it's 100% open source and all code is available for audit. 18:23:43 and another thing, even though i plan to run on AMD-SEV im wondering if SmartOS encrypts itself to memory? 18:24:01 We even have an open Jenkins instance where builds can be observed by 3rd parties. 18:24:58 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. 18:25:37 allright, yes i saw that, thou like Zephyr-RTOS 2.7.x LTS are code-audited officially. 18:25:40 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. 18:25:51 just small wondering of mine. 18:26:15 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. 18:27:05 Any operating system that claims to be encrypted in memory is either playing word games or is outright lying. 18:27:32 So, in regards on the kernel, does it use a shadowstack or? 18:28:33 No, we use a different mechanism called stack smashing protection. 18:29:02 i see. 18:30:24 It's much more efficient than shadowstack. 18:30:40 They're diffrent mechanisms actually. 18:30:54 The shadowstack is usually part of CFI protections in the CPU. 18:31:05 That's pretty orthogonal to stack smashing protection tbh. 18:31:56 Yeah, but I mean that both are intended to mitigate buffer overflows. 18:34:35 We don't use shadowstack to prevent buffer overflow, we use SSP, which is entirely different, but is still buffer overflow protection. 18:34:55 Yeah, but we do want to have both some day. 18:35:00 (in illumos at least) 18:35:05 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? 18:38:01 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. 18:38:21 What is considered grsec-like will vary greatly from person to person. 18:38:32 PaX? 18:38:56 kernel lockdown? 18:39:51 I think so. 18:40:29 kernel lockdown no, but tenant instances don't have access to anything that would need locking down. 18:41:56 ah yeah, i suppose. gotta ask since i never used bhyve - what are the pros/cons vs kvm? 18:42:33 BHYVE has a lot more modern support and active development. 18:42:35 bhyve is an all original vmm created by FreeBSD. 18:42:53 When comparing FreeBSD vs Linux KVM, there may be various points made by each side. 18:43:11 For illumos/SmartOS bhyve is a better choice for us. 18:43:14 ^^^ 18:43:23 in security context, what would you say? 18:43:37 KVM is GPL, which there are differences of opinion on how relevant that is. 18:44:06 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. 18:44:21 And when I say "KVM" I mean "the KVM used in SmartOS and other illumos distros." 18:44:23 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. 18:44:38 KVM in Linux is under development too, but none of that was pulled into the illumos kvm. 18:44:50 And @bahamat nails the other reason. 18:44:50 On SmartOS, both KVM and Bhyve run inside a zone with stripped down permission. 18:44:59 Yes, the "double-hulled" virtualization. 18:45:33 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. 18:45:38 Even if BHYVE or KVM is escaped, you then have to escape a non-global zone if you want to do real damage. 18:46:03 kvm/bhyve brand zones are restricted from doing things like forking, reading files, listening on the network, sending packets, etc. 18:47:04 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. 18:47:22 i understand. 18:49:28 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. 18:50:19 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. 18:50:30 If i setup a zone w/o any specified rules, do the root user on guest vm still able to do ioctl for instance? 18:51:01 bahamut, ofc i understand that. 18:51:09 So, technically yes, but that doesn't allow them to do just anything. 18:51:24 There are a lot of things that use ioctl to perform various permitted tasks. 18:51:58 But root in a non-global zone can't use ioctl to do anything malicious to the global zone. 18:52:33 right right, but by advanced evasion techniques, do you know any case a breach have been done thouroughly? 18:53:03 There have been zone breakout issues in the past. There are currently no known methods for escaping a zone. 18:53:26 okay. 18:53:39 gotta check cve's i guess. 18:53:40 If such an issue were discovered or reported, it would receive the highest priority for fixing it. 18:54:19 sounds good to me, notice you update very frequent. 18:54:54 Yeah, we have biweekly releases, and if there are security critical issues we will publish updates out of cycle as needed. 18:55:21 Our advisories are published here: https://security.tritondatacenter.com 18:55:33 have you ever thought of the possibility to run S-Os on like an SoC or from disk? 18:55:41 And we send announcements to smartos-discuss@ or sdc-discuss@ as necesary. 18:55:45 thank you,bahamut 18:56:12 Running on an SoC would depend on the architecture of the device. 18:56:47 If there were an x86_64 SoC system and we had driver support for everything, then it should work no problem. 18:57:00 We don't currently run on ARM or RISC-V. 18:57:13 like FPGA for AMD? 18:57:47 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. 18:57:53 that requires ofc a microkernel and diff install-method 18:58:13 Well illumos isn't a microkernel. 18:58:42 And there isn't really an install method. You just boot the platform image. 18:59:16 but that could be done via kconfig'ing and only have the platform-specific's,right? 18:59:27 "install" 18:59:36 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. 19:01:51 something like that 19:02:04 FYI, we're having our office hours on Discord, so my replies may not be as prompt until that's over. 19:03:59 if you look at the approach Zephyr-rtos takes, they offer support to ESP etc, dunno if you looked at their project. 19:04:15 (?) 19:04:18 If you're interested, the discord is https://discord.gg/rgkeBVRw 19:04:52 I haven't particularly looked at zephyr, though I'm aware of the project. 19:04:55 bahamut, that's good to know. i can't get into discord on the device im on. 19:05:53 No worries. I felt it might be rude to mention that I was participating in a public forum elsewehere, but not provide the link :-) 19:06:21 they use platform-specfic builds to the kernel upon "installation", thou it is'nt really 'easy' to use. 19:06:50 Oh, no I don't think we'd use something like that. 19:07:24 Our infrastructure makes the running system auditable because it can be cross referenced against known approved images. 19:07:57 that's where SmartOS actually got my attention, plus the image-type system looks great. 19:08:11 The boot image hash is verified, and it includes a manifest of all objects and their hashes shipped in the platform image. 19:08:48 and i need some more knowledge to illumos also, all bsd stuff always been rigid 19:09:05 We don't have explicit tooling for "please verify the running system", but a knowledgable operator can perform those checks manually. 19:09:21 can you use TPM directly from the SmartOS? 19:09:48 tpm2.0* 19:09:58 didnt see it in pkgs 19:12:22 no 19:12:28 there currently isn't a driver 19:12:41 or the tpm driver currently only supports the older tpm1.2 devices 19:13:52 really? 19:14:14 How do i deal w/ that, from guest-vm? 19:14:42 you'd never really want to pass through a HW tpm though 19:15:15 for secure boots,yes? or why not? 19:15:28 because the state of the hw tpm isn't going to be correct for secure boot 19:16:00 upstream bhyve added some hooks for supporting virtual tpms, not sure if they've made it back yet 19:16:21 (then would need to do a bit of wiring up) 19:16:30 if you sign the illumos-kernel? 19:16:42 would'nt that be wanted? 19:17:12 or what you mean state incorrect? 19:17:17 still.. the problem is secure boot is kinda like a blockchain.. order matters 19:17:37 each bit hashes the next thing 19:19:53 so each step compares the values to known values to determine if things are 'ok' 19:19:59 i''m not 100% on the tpm, but verifying the kernel & then firmware..? or do you mean the boot-process of a usb? 19:21:44 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 19:23:04 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 19:23:30 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 19:24:47 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 19:24:57 which would probably grab several other things on the system 19:26:04 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.. 19:26:48 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. 19:27:47 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. 19:28:40 As far as ensuring the platform image you're running is the image you think you're running, I already discussed that above. 19:29:04 no, i mainly wanted to use TPM as it includes other protections, again where writelocks to specific mcu's lie.. 19:29:23 Neither of these use hardware enforcement, so if you have a hard requirement on TPM that's something that will be a concern. 19:29:37 yes i see. 19:29:56 But in lieu of hardware enforcement, we do already have some strong verification mechanisms in place. 19:30:14 right. 19:31:32 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? 19:31:53 is that correct btw? 19:32:17 If someone wanted to replace all the firmware on your computer, lack of driver is not going to be a problem 19:32:36 But you realise how difficult and targeted that would be, right? 19:32:58 >.< 19:33:09 yea.. 19:35:45 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. 19:38:05 We provide images of popular guests, but you can also create your own instances from scratch, and even perform the install from some media. 19:38:42 there's a mostly working tpm2 driver under development, just not finished yet 19:41:09 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! :) 19:41:37 still needs TAB support and testing w/ TPMs that use CRB for it's interface, and more testing in general 19:43:01 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 :) 19:43:42 unfortunately, i don't have an easy way to distribute an image w/ the driver 19:48:22 if you're adventureous to build your own smartos image, https://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) 19:50:16 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) 19:54:02 oh hrm.. looking at that branch, i haven't squashed down the most recent stuff... 20:01:05 there updated 20:15:32 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(?) 20:18:57 im not that adventureous as of nowm but in near future i could make an attempt. 20:19:04 now* 20:36:38 hardenedbsd is a FreeBSD derivative 20:38:08 ! 20:38:34 this is why i need to get more into the bsd-world. xD 20:38:43 well it's called hardenedBSD for a reason 20:42:11 netbsd,openbsd,freebsd..it's a bit confusing, which actually makes a linux-lowlife like me think they're kinda-the-same ;p 20:46:35 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? 21:21:33 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? 21:39:33 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 21:43:50 zt3phan : log.omnios.org 22:05:25 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'? 22:10:08 ISTR (though could be confusing things) the MOV* settings might be related to hw vulnerabilities (side channels I think) 22:10:44 so it probably depends on what you plan to run on the system.. if it's multi-tenant or untrusted stuff 22:10:51 might not want it enabled