8 ms·
The Sheer Terror of PAM
- intsunny 4y ago20'ish years ago I remember the original author of the `pam_realm` PAM module [0] writing the module becase "it was easier to work around PAM, than to understand what the fuck was happening inside of PAM". [0] https://github.com/sa2ajj/pam-realm https://github.com/sa2ajj/pam-realm
- _8j50 4y agoLast time I encountered pam, I did the same thing with pam_exec and pointed it to my python script.
- proto_lambda 4y agoTitle should be "PAM", not "Pam".
- nprecup 4y agoI thought this was going to be about the show Archer.
- culturestate 4y agoI thought I was about to read a study detailing the horrific long-term effects of using aerosolized non-stick spray for cooking.
- vk5tu 4y agoThere's a trend that writing is for readers, rather than dictated by company PR. If you are writing for readers, then follow the usual rules for proper nouns where the word is a not-really-initialism which was never meant to be read as its individual letters. PAM™ was always Pam, not P.A.M.
- pram 4y agoIt was always PAM https://opensource.apple.com/source/pam/pam-31/pam/doc/specs/rfc86.0.txt.auto.html https://opensource.apple.com/source/pam/pam-31/pam/doc/specs...
- cryptonector 4y agoI remember the OS/Net gatekeeper (gosh, I forget his name right this moment) getting up to write on a board that the way to spell PAM is SUX. Yup.
- BiteCode_dev 4y agoThe format of the article, and it's unwillingless to go to the point made me quit reading half way. Even in reader mode the flow of reading is interrupted every 2 lines by a large useless image or some snarky comment from the author. Too bad, it's an interesting topic.
- xena 4y agoAuthor here. Would my raw talk script without any of the visual aids I put in the talk be better here?
- jjjjoe 4y agoAbsolutely! I suspect it would also alleviate a couple of headscratchers like where you spelled out "underscore" when setting a breakpoint.
- xena 4y agoLooks like I missed a sed command or two. I usually write out "underscore" in the script so I read it literally during recording: https://i.imgur.com/j3RdHA5.png https://i.imgur.com/j3RdHA5.png I write out punctuation like underscore so that I know that is what I am literally saying to the camera. I usually edit that out. Apparently I missed out on that this time. Oops! Sorry. I'll put that on the checklist for next time (half considering making tests fail if I forget to do it).
- BiteCode_dev 4y agoYes, or just an option to hide the slides.
- xena 4y agoHere: https://gist.github.com/Xe/400756b7d93f40b0b7ec48c65b7d066d https://gist.github.com/Xe/400756b7d93f40b0b7ec48c65b7d066d I'll work on something more cohesive for the next talk. Sorry about this!
- CottonMcKnight 4y agoSolution: Let's reimplement PAM in systemd! That should make everyone happy.
- dale_glass 4y agoI think that this is seriously a great idea. PAM should be a service that communicates over an UNIX socket. Upsides: * You can completely isolate it from anything else. Lock it into a sandbox. Use SELinux to ensure it doesn't do anything weird. * Much more secure -- you have a very narrow communication channel, and no exposure to stuff like LD_PRELOAD. * You avoid the mess of the above for the applications using it. Apps using PAM execute PAM code, and that means that anything that uses PAM needs to be able to do any arbitrary thing a PAM module might want to do. * Applications using PAM no longer need to have root access. Your screensaver/lock screen can be completely unprivileged. * If it can be an UNIX socket, it probably can also be a TCP socket, so you can have it run remotely if such a thing makes sense. * The protocol can be inspected * Good opportunity for updating the API and fixing anything lacking.
- krnlpnc 4y agoLet’s move the linux kernel and sshd into systemd while we’re at it
- smitty1e 4y agoSee your kernel; raise you the whole data center.
- dale_glass 4y agoYou're joking, but I'm 100% serious. PAM is crusty and has a bad architecture. The fact that it's written in C, and is linked into another program as a library makes it impossible to fully isolate it from its host application, and exposes it to a myriad possible exploit points. Even wrapper binaries are not a great idea because of how UNIX works. fork() + exec() means the executed binary inherits a lot of state from the caller. Open files, signals, environment variables, chroot, mlock, resource limits, seccomp... there's a myriad of mechanisms that an executed binary can be exposed to, and even if it somehow perfectly takes all of them into account and defends itself against any possible malicious manipulation, the next kernel version could add a new one. That's why I think a sane, modern version of PAM should be a service and only communicate via a UNIX socket. That way you vastly reduce the attack surface, and allow locking up the PAM bits into their own, well defended box.
- somat 4y agoThe openbsd auth system is interesting, I don't know if it is any safer than pam(it probably isn't) however because it operates across process boundaries instead of trying to dlopen everything in the same process it feels more human scale, that is, you feel you can actually debug and modify it without a Phd. http://man.openbsd.org/login.conf#AUTHENTICATION http://man.openbsd.org/login.conf#AUTHENTICATION
- csense 4y agoI can't believe someone made a talk about PAM filled with memes and anime references and didn't include Obake PAM, the CEO vtuber [1]. [1] https://www.youtube.com/c/ObakePAMCh https://www.youtube.com/c/ObakePAMCh
- xena 4y agoOh my god I didn't know that was a thing. I feel like I missed an amazing chance for shitposting. I'll be sure to get it next time!
- hkgjjgjfjfjfjf 4y ago
- betaby 4y agoArticle can be summarized: "I didn't knew much about PAM, had random assumption and wasted a bit of time in the process". Not much of the substance unfortunately.
- hrbf 4y agoYears ago, I’ve found an inverse correlation between emoji frequency and information quality. Anime is usually indicative as well, as is excessive use of imagery in general. All together are a dead give-away.
- tyingq 4y agoI found parts of it interesting, but I couldn't tell why the author [edited] was ascribing so many issues to be PAM's fault. Debugging dynamically loaded libraries, for example. Many things use dynamically loaded libraries, and it's not surprising PAM does so, given the need to be "pluggable".
- xena 4y agoAuthor here. I am not male, you are making a factual error by referring to me as such. Please do not do this in the future.
- tyingq 4y agoEdited, though I can't commit to not ever making mistakes in the future :)
- xena 4y agoSomehow that's worse. Is it really that hard to call someone "they"? Please excuse my bluntness, but this is an English language construct that's existed since Beowulf (an epic poem that predates even Middle English). Saying '[edited out "he"]' looks like you are invalidating my own view of my identity. I have to deal with enough of this already. Why do you feel you need to add to the pile? What have I done to deserve such treatment?
- YarickR2 4y ago
- nn3 4y agoHyperbole 2.0 with too much image search.
- xena 4y agoJust you wait. I have DALL-E 2 and Stable Diffusion access now.
- arggies 4y ago
- r00tbeer 4y agoThis is systems debugging: "After hacking around for a while I got nowhere, but in so much detail."
- INGSOCIALITE 4y agoThe floating AD exactly where your thumb goes in mobile made me instantly stop reading
- xena 4y agoThat seems to be a bug with ethical ads. I've already escalated to upstream. Sorry about that! I literally didn't know that was a problem until yesterday. It worked before, something must have changed on their end.
- nix23 4y agoPAM Mastery is a pretty good book, but yes it's a hard system.
- xena 4y agoLink? I feel like that book would have helped me a lot.
- hoseja 4y ago"Archmage of Infrastructure", really?
- commandlinefan 4y agoUnfortunately, that sets the tone for the rest of the article.
- xena 4y agoYes, really. I've always wanted that job title.