/srv/irclogs.ubuntu.com/2022/10/27/#ubuntu-security.txt

sdeziel`grub-efi-amd64` is apparently getting a security fix but apt seems to be phasing its distribution as on some of my machines it is listed as being "kept back"17:35
sdezielis this normal for security fixes to have "phasing" applied?17:35
sdezielhttps://termbin.com/du4o => what I ran17:36
sdezielhmm, `apt policy` (https://termbin.com/x2s3) doesn't even show this package as being available through http://security.ubuntu.com/ubuntu/17:41
ahasenackyo #security, do you recall why in ubuntu we don't share [homes] by default in samba? https://pastebin.ubuntu.com/p/FmkZXNVCqx/18:05
ahasenackmaybe because home was 0755 until recently?18:05
ahasenackbut still, over the network, you would only be able to see the contents of home through samba if you authenticated as the user18:05
ahasenackthat commit was from 2013, for trusty18:06
ahasenackmaybe to avoid clear-text traffic of things like ~/.gnupg, ~/.ssh and such?18:07
ahasenackback then it was clear text, I'm almost sure18:08
mdeslaurahasenack: I can't remember exactly, but I still don't think it's a good idea to enable that by default...especially since it would allow access to home directories with simple passwords?18:08
sdezielahasenack: nowadays those files are denied access by smbd's Apparmor policy18:08
* sdeziel wonders if smbd's AA policy defaults to enable18:09
ahasenacksdeziel: you mean the samba apaprmor? Sorry, not there by default18:09
sdezielah, sorry then18:09
ahasenackhint: I'll try to get it in good shape for lunar lobster18:09
ahasenackmdeslaur: first you would have to create the samba user matching your linux user (smbpasswd -a <user>)18:10
ahasenackand that password can be anything, yes18:10
mdeslaurhrm18:10
mdeslaurI thought we were using something that did that automatically18:10
ahasenackso uncommenting [homes] won't export it by default18:10
mdeslaurdidn't we have pam integration or something?18:11
ahasenackI mean, it will be visible, but there will be no set of credentials to access it18:11
ahasenackthere are pam account restrictions that samba should follow, yes18:11
ahasenackand "unix password sync", and some horrible expect-like "chat" setting, if you use the network RPC calls to change a user's password18:12
ahasenackbut the tdb file with the samba user passwords is born empty18:12
ahasenackI can try some of those remotely, see if they do anything nowadays, with a default config18:13
sdezielahasenack: I was even more wrong, the smbd profile doesn't even include the `<abstractions/private-files>` I think it did :/18:13
ahasenackI'll take note of that18:13
ahasenackoh, there is a lot of stuff in there18:13
mdeslaurI'd have to trace back to when we did the change and try and find the uds discussion about it18:15
ahasenackthe changelog has no bug number, too bad18:15
ahasenackit was done by zulcss18:16
ahasenack(Chuck SHort)18:16
sdezielactually, you need the -strict version (`<abstractions/private-files-strict>`) to block `~/.ssh/` and `/.gnupg/`18:16
ahasenackin 2:4.0.10+dfsg-4ubuntu118:16
ahasenackhere: https://git.launchpad.net/ubuntu/+source/samba/commit/?h=import/2%254.0.10%2bdfsg-4ubuntu1&id=16a3ec29185c83d7a4d9a5c59cd680f9a406bc8a18:17
-ubottu:#ubuntu-security- Commit 16a3ec2 in ubuntu/+source/samba "2:4.0.10+dfsg-4ubuntu1 (patches unapplied) import/2%4.0.10+dfsg-4ubuntu1"18:17
mdeslaurI have a feeling the change is older than that, he just dropped the history there18:19
* mdeslaur looks18:19
mdeslaursamba (3.0.22-1ubuntu3) dapper; urgency=low18:21
mdeslaur  * Config file changes only in this upload; no destabilising code changes.18:21
mdeslaur  * Comment out the default [homes] shares and add more verbose comments to18:21
mdeslaur    explain what they do and how they work (closes: launchpad.net/27608)18:21
mdeslaurhttps://bugs.launchpad.net/ubuntu/+source/samba/+bug/2760818:21
-ubottu:#ubuntu-security- Launchpad bug 27608 in samba (Ubuntu) "Entire home dir is shared within another in samba!" [Medium, Fix Released]18:21
mdeslaurahasenack: I think I remember now....gnome directory sharing used samba, so as soon as you right clicked on a directory and shared it, samba would share your home directory without you knowing18:22
mdeslauryeah, that's why we disabled that18:23
ahasenackah, good find about the older change18:27
ahasenackthat gnome share thing still exists, but it requires you to run "sudo smbpasswd -a <yourname>" nowadays, or last I checked18:27
ahasenackI think back then in 3.0.x days, samba was using plain text passwords still perhaps?18:27
ahasenackremember one had to change a registry setting in windows to get it to use plain text passwords and then work with samba?18:28
ahasenackthis would be one way to get it to work without the smbpasswd command, samba could then just check /etc/shadow as any other app (get the clear text password from the user, hash it, compare)18:28
mdeslaurhrm, I think it would ask you to set a password18:31
mdeslaurI'd have to try it18:31
mdeslaurone sec18:31
mdeslaurI do know upstream gnome switched to clear text webdav at some point, but we kept samba integration18:32
ahasenackugh, no attachments to that bug, just links to external sites, links that are dead now of course18:34
ahasenackah18:35
ahasenackthe guy shared a directory within his home, and gave the *share* the name of his user18:35
ahasenackwhich of course triggers [homes] 18:35
mdeslaurwouldn't sharing any other directory do the same thing, as soon as you set the password?18:36
ahasenackno, the username is special18:36
ahasenackif you access //server/<your-linux-user>, it will clone the [homes] share and create a share called [your-linux-user]18:36
ahasenackbut he had a share [your-linux-user] already created, for another directory18:37
ahasenackvia gnome18:37
ahasenackI don't know if this is undefined behavior (two shares with the same name pointing at different paths)18:37
ahasenackbut it's something I can try18:37
mdeslaurwell, if [homes] is configured, isn't your home directory shared as soon as you create a password?18:37
ahasenackabout the cloning of [homes], I mean samba will create [your-linux-user] with a path of ~your-linux-user (i.e., your-linux-user's $HOME)18:38
mdeslaurhow the heck is gnome creating the share...I can see it but I have no idea where it's telling samba to add it18:41
ahasenackif [homes] is configured, any access to //server/valid-linux-user will create [valid-linux-user] with the settings from [homes]. If [homes] requires a password, then you will need a password. The extra nice setting to have is "valid users = %S", so the only valid user for that share will be the actual home owner18:41
ahasenackgnome is using a dynamic share mechanism, just a sec, I even fixed a bug in that for jammy or kinetic18:41
ahasenack"usershare" is its name18:42
ahasenackthere is a sambashare unix group18:42
ahasenacksearch for "USERSHARES" in man smb.conf18:43
mdeslaurah, it's in /var/lib/samba/usershares huh18:46
ahasenack_it's nautilus-share: https://bugs.launchpad.net/ubuntu/+source/nautilus-share/+bug/196724518:51
-ubottu:#ubuntu-security- Launchpad bug 1967245 in nautilus-share (Ubuntu) "'net usershare' returned error 255 on jammy-desktop-amd64" [High, Fix Released]18:51
mdeslaurah yes, that's it18:51
=== ahasenack_ is now known as ahasenack
mdeslaurahasenack: perhaps we can talk about this next week at the sprint18:57
ahasenackI won't be there I'm afraid (phisically), but I'll attend remotely, time shifting18:58
mdeslaurah, I see18:58
ahasenackI'm revisiting this because it's one delta we have with debian18:58
mdeslaurI'd like amurray to chime in on this...I still think it's odd to share everyone's directories by default, it's kind of unexpected18:59
ahasenackit's a valid point19:00
ahasenackwell, the good news is that nautilus-share (well, the "net usershare" command from samba, which creates these shares) does not allow you to create a share that matches a local user19:20
ahasenack"""'net usershare' returned error 255: net usershare add: share name debian is already a valid system user name"""19:20
ahasenackI have a local debian user, and opted to share my ~/Videos directory, but gave the share the name "debian"19:21
ahasenackand I don't even have [homes] enabled19:21
ahasenackso maybe the concerns of that original bug are gone, but it's still a valid point of discussion, if we should share [homes] by default or not19:21
ahasenackfor now, I'll keep it as is, of course (not sharing)19:22
ahasenackit's a small delta with debian anyway19:22
ahasenackthis usershare thing is wonky19:28
=== fauxpride- is now known as fauxpride
=== martums6 is now known as martums

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!