-
tm512
does anyone here know exactly the magnitude of the security issues that are posed by Firefox's and chromium's lack of sandboxing on FreeBSD? like is it worth taking additional measures like using completely separate browser instances for different things, like keeping banking/finance stuff separate?
-
rtprio
separate to what? you intend to set up another computer just for checking your finances?
-
lw
tm512: the practical impact is that if someone finds an exploit in the browser, they will have access to your entire Unix account, so using separate instances/profiles probably makes little difference, unless you run as a completely separate uid
-
rtprio
finds an exploit, constructs the exploit, and lures you to visit said exploit
-
lw
rtprio: and the exploit has to run on freebsd...
-
tm512
I think it was mentioned on one of the FreeBSD forum posts about this but I remember reading something about how the sandboxing is largely to protect processes in the firefox process tree from each other, not just isolating each process from the rest of the system
-
tm512
so like it would help prevent an exploit in one process from, say, reading out my paypal login token/credentials from paypal running in another tab
-
lw
aiui the sandboxed process is isolated from everything, which includes other tabs as an indirect consequence
-
lw
like, even without sandboxing, one tab can't just read random data from another tab, but an exploit that allowed complete access to your account (as is the case without sandboxing) would allow that since the other tab is running under your uid
-
tm512
alright. might just not worry about it, but just wanted to know exactly what the implications are
-
lw
it makes me a bit uneasy too tbh, given how many browser exploits are discovered
-
tm512
I might end up setting up capsicumizer to, like, restrict FF to only accessing its configuration/cache directories, in addition to my downloads folder, but I dunno
-
lw
-
tm512
it's a shame that there seems to be so little interest in adding sandboxing capabilities to browsers on FreeBSD. I saw that there has been *some* work done that just fizzled out
-
VimDiesel
Title: src - FreeBSD source tree
-
lw
tm512: browser vendors don't care about freebsd and will not support it, so adding such capability would mean effort to maintain it forever, no one cares enough i guess
-
lw
the internet only runs on windows, mac and linux
-
lw
i mean, Mozilla won't even support OSS *audio output* in Firefox, so the chance they will care about sandboxing is ...
-
lw
if we had a browser vendor who actually cared about an open internet, perhaps they would support freebsd, but google's hostile takeover of w3c pretty much ensured that maintaining a basic web browser requires full-time commercial support by itself, so that's the situation we are in now
-
lw
(in case you can't tell, i am quite bitter about this)
-
tm512
I thought cubeb, firefox's audio backend, has OSS support integrated even if it's not "Tier 1" support
-
lw
tm512: it has tier 2 OSS support, that means Mozilla does not support it and doesn't care if it breaks
-
lw
random people in "the community", i.e. you, might choose to maintain it and fix it when it breaks, Mozilla will not
-
lw
now imagine that policy applied to sandboxing, one day Mozilla adds a new sandbox feature that doesn't work in capsicum, and now Firefox is completely broken on freebsd until "the community" fixes it
-
tm512
this whole discussion about official support is kinda describing why I mostly left BSD behind for Linux even though BSD has a special place in my heart, heh
-
lw
yeah, this is why people like mozilla and google get away with this stuff... they know users care more about having an actually functional system
-
lw
which is understandable, i don't blame the users
-
tm512
in the case of this system I'm setting up currently, it's just a laptop, gonna be my secondary machine, and I'm not gonna need it for much that BSDs struggle with like gaming
-
tm512
so FreeBSD is going to be a nice change of pace. also haven't checked out the OS since I was running 11-STABLE as my desktop daily-driver
-
tm512
hmm, so I thought this issue with things using llvmpipe was fixed, but it's actually not, and it's directly tied to running picom (at least with the glx backend, haven't tested xrender)
-
tm512
if I spin up picom, my system console gets flooded with "fault errors on pipe A" messages, and everything else that tries to use GL falls back to using llvmpipe
-
tm512
I might try the Linux 5.10 DRM drivers instead, assuming they support comet lake? I remember having issues with actual Linux 5.10 on comet lake in the past, though
-
lw
what are you using now? drm-61-kmod?
-
tm512
I'm using the 5.15 drivers, the newest that I saw available. it looked like the 6.1 drivers needed to be compiled from source
-
tm512
I may give those a shot though if they support 14-STABLE
-
tm512
according to freshports that version is only available on 15-CURRENT :/
-
lw
ah
-
tm512
I might try configuring Xorg to use xf86-video-intel instead of the modesetting driver, see if there's something specific to the combination of modesetting and picom that causes this issue
-
tm512
even though it generally seems like modesetting is the preferred driver for supported hardware nowadays
-
tm512
looking up this error message I'm not finding any search results that seem even remotely related to the issue I've encountered
-
tm512
I dunno if I'm brave enough to try 15-CURRENT in order to try out the Linux 6.1 drivers. or maybe "brave enough", but not willing enough to tolerate the higher likelihood of regressions and bugs and the inconveniences those would cause
-
RoyalYork
Anyone going to BSDCan?
-
tm512
so downgrading to drm-510-kmod gets rid of the fault errors, but picom still breaks things, causing glxinfo to report that llvmpipe is being used
-
tm512
weird, now it's just working
-
CrtxReavr
So in /boot/loader.conf all values on the right side of the = need to be double-quoted?
-
lw
CrtxReavr: no, i never bother
-
lw
maybe some kinds of value need to be quoted but i haven't found one yet
-
darwin
i worship Daemon and that's one reason I use *BSD
-
CrtxReavr
Hmmm
-
kevans
CrtxReavr: only more complex values
-
kevans
numbers and single-word values are fine
-
kevans
if you need a symbol it'll probably shit the bed, better to quote it even if it's still technically one word
-
CrtxReavr
Seems like everything I set is 0 or 1
-
kevans
yeah, those will all be fine
-
kevans
I still tend to quote out of habit, but lualoader hasn't screwed this up since the earlier days of it living in the tree
-
remiliascarlet
I have installed `pinentry` on both FreeBSD and OpenBSD, but both tell me "復号に失敗しました: Pinentryがありません" (translation: decryption has failed: there is no Pinentry), despite having installed pinentry and pinentry-ncurses already.
-
remiliascarlet
Anyone know how the fuck this happened?
-
remiliascarlet
Nevermind, solved it.
-
remiliascarlet
pkill gpg-agent && gpg-agent --pinentry-program=/usr/local/bin/pinentry-curses --daemon
-
kenrap
remiliascarlet: 👍
-
tmp_
remiliascarlet: You can set the default pinentry-progrm in ~/.gnupg/gpg-agent.conf
-
nerozero
Hello there
-
nerozero
anybody alive in this channel ?
-
kenrap
-
VimDiesel
Title: Don't ask to ask, just ask
-
nerozero
"D
-
nerozero
ok then, is it possible to get pkg info to return list of packages origin only ?
-
nerozero
eg pkg info -o php\* | awk '{ print $2 ; }'
-
nerozero
never mind managed to do that by using pkg query %o ...
-
kenrap
and it appears that even asking the question directly, helped you rubber-duck'd the problem too, so yet another reason not to ask to ask :P
-
spmzt
Hi, has anyone tried Samba clustering with FreeBSD before? AFAIK, CTDB is not available on FreeBSD.
-
remiliascarlet
tmp_: I figured that out a bit later, but wasn't enough to get shit working.
-
remiliascarlet
And it doesn't help when Linux, Haiku, Solaris, and many other Unix systems use /usr/bin, FreeBSD and OpenBSD use /usr/local/bin, and NetBSD uses /usr/pkg/bin, and auto-sync this across one other.
-
remiliascarlet
Auto-sync the dotfiles.
-
tmp_
Or have NFS home directories across multiple OS's.
-
mason
remiliascarlet: FreeBSD can theoretically use /usr/pkg or /opt/foo or whatever, although it's been a while since I tried. I should try again in 14.x
-
» babz wonders how many ports would break by doing that
-
otis
with user.localbase properly set it should not be a problem
-
debdrup
mason: redefining LOCALBASE is easy (in so far as setting it in make.conf(5), and compiling ports using poudriere, so not simple) - but I'd question what one gains from doing that, when hier(5) quite demonstrably has carved out the entire namespace of 'local' for this.
-
babz
when a path is hardcoded..
-
debdrup
Well, uh.. it isn't hard-coded, is the entire point.
-
mason
debdrup: I still cling to this notion that /usr/local is for the local admin, not for packages provided by the system.
-
mason
It's why I like what pkgsrc does in that regard. I understand it's a minority viewpoint here.
-
debdrup
mason: well, the official definition for local is "local to this installation"
-
debdrup
That kinda covers both scenarios.
-
mason
debdrup: Right, but then non-ports things installed in /usr/local becomes problematic and potentially rife with conflict.
-
mason
s/becomes/become/
-
» tmp_ agrees with mason.
-
debdrup
Like, I'm not saying don't do it - but building an entire set of ports just to change LOCALBASE seems like wasting electricity.
-
mason
That too.
-
debdrup
mason: I see your point, I just don't agree with it.
-
tmp_
One of the sites I'm supporting currently has a mix of ports and custom tools in /usr/local.
-
debdrup
In my mind, something either belongs in the FreeBSD distribution sets, or it's local to a specific installation. If it's former, then it gets added to the distribution by the system operator, in the form of build-time, install-time, or run-time configuration via modification of the source, use of poudriere-image/bsdinstall, or ansible/chef/et al.
-
debdrup
tmp_: there's where the ability to add custom ports/packages comes in, since you can have a whole set of custom things added that either inherit existing makefiles or build custom stuff.
-
debdrup
Welp.
-
debdrup
I forget what the make.conf(5) switch for adding a custom category is, right now..
-
babz
debdrup: so, if I have a script starting with, say
-
babz
#!/usr/local/bin/bash
-
babz
user.localbase can automatically relocate it ?
-
debdrup
babz: #!/usr/bin/env is the solution to cross-platform scripts that rely on the miscellaneous binary image activator in the kernel (which is what you're denoting with the hash-bang path).
-
debdrup
binmiscctl(8) can also be used for some things along that line (which, for example, is how you make it possible to launch Windows PE32(+) binatires via the command-line using Wine).
-
debdrup
Oh right, it's VALID_CATEGORIES+=bleh in make.conf(5) and then adding the 'bleh' directory in your ports copy of the ports framework (probably best done on a branch that you merge the head onto).
-
markmcb
in an rc script, how do you hard fail? i.e., "if critical thing didn't happen" then "stop the boot process and drop into single user mode." i see things like force_depend, but curious if there's an approach for a hard stop.
-
rwp
markmcb, IIUC one just returns 1 from the script. So for example for service "foo" then in a function foo_prestart() { return 1; } would be a hard stop. Pretty sure.
-
markmcb
rwp: thanks, that's quite easy
-
rwp
It looks like the function name might actually be defined in start_precmd="${name}_whatever" so I would name it foo_precmd() in that case. I guess.
-
rwp
-
VimDiesel
Title: Practical rc.d scripting in BSD | FreeBSD Documentation Portal
-
markmcb
that is what i was reading that triggered the thought
-
rwp
And I am finding that their example is mixing the notations of prestart and precmd in ways that I wish they did not. But it seems to not matter. It seems to be whatever is declared as the function to call in start_precmd variable is used making the name arbitrary. But I still think it should be consistent.
-
rwp
man rc.subr documents argument_precmd and I am pretty sure "argument" is meant to be start, stop, restart, and so on.
-
rwp
Looking at /etc/rc.subr directly the embedded comment documentation is much better! There it is documented as "${rc_arg}_precmd n -- If set, run just before performing the ${rc_arg}_cmd method in the default operation (i.e, after checking for required bits and process (non)existence). If this completes with a non-zero exit code, don't run ${rc_arg}_cmd."
-
rwp
The "n" in that says it is optional.
-
rwp
And yes tracing through the rc.subr use of it the return from that function (ex :return 1) will propagate through and become the exit code for the entire service script. Which I presume would then be listed as a failure at boot time.
-
rwp
Looking at /etc/rc.d/sshd for one example that we all will have I see that it is using sshd_precmd() to do an "sshd -t" configuration test before starting. If that fails then the sshd_precmd() returns 1 (by implicit fallthrough, I do not approve, I would like to see an explicit return there) and that would exit the entire script at that point before starting the sshd.
-
rwp
By inspection looking at both sshd_keygen() and sshd_precmd() I think the script is playing "loose" with possible errors. Each of those lines should be "|| return 1" for pedantically correct operation. As written they currently only depend upon the return of the last command call in each of those functions.
-
rwp
Which obviously has been sufficient and it is not causing problems, and unlikely to have problems, but by inspection it does not seem totally correct. I could contrive an example where it would partially fail but not be reported. I think.