HNHacker News
TopNewBestAskShowJobs

dividuum

2,704 karma · joined October 19, 2011

I love programming

Working full time on a digital signage service:

  https://info-beamer.com
See https://dividuum.de/ for other projects.

Contact me at fw@dividuum.de / @dividuum

submissionscomments
dividuum··on Ask HN: How to handle user file uploads?
Is using ClamAv because of some compliance checklist that forces you to include a virus scanner in there? Otherwise I don’t see how adding a ton of additional complexity with a proven track record of CVEs would add any security at all.
dividuum··on Ask HN: How to handle user file uploads?
I recently redesigned my stack of validating uploaded files and creating thumbnails from them. My approach is to have different binaries per file type (currently images JPEG/PNG, videos H264/265 and truetype fonts). Each of them is implemented as in a way that they receive the raw data stream via stdin and then either generate an error message or a raw planar RGBA data stream via stdout. The validation and thumbnail process is triggered after first locking in the process in a seccomp strict mode jail before touching any of the untrustworthy data. Seccomp prevents them from basically every syscall except read/write. Even if there would be an exploit in the format parser, it would very likely not get anywhere as there’s literally nothing it could do except write to stdout. Outside a strict time limit is enforced.

The raw RGBA output is then received and converted back into PNG or similar. It was a bit tricky to get everything working without additional allocation and using syscalls triggered by glibc somewhere, but works pretty well now and is fast enough for my use case (around 20ms/item).

dividuum··on Ask HN: How to handle user file uploads?
I'm pretty sure ClamAv would add more vulnerabilities to your stack than it might prevent from being exploited.
dividuum··on We ensure Cloudflare customers aren't affected by LE's certificate chain change
I'm surprised they basically choose to ignore explicitly made CAA records, if they don’t match any of their CAs. Why bother with setting up CAA records at all if they will be silently ignored?
dividuum··on Show HN: Neco – Coroutine Library for C
I assume it meant to be arg1 to showcase that the malloc for arg1 can be free'd without resulting in a use-after-free after having copied the value out of argv[1] within the coroutine.
dividuum··on Using Rsync for Backup
Hope this doesn’t come across as negative, but I’m not sure why one would use rsync when dedicated solutions like restic exists that are superior in almost all aspects, except maybe raw copy performance: built-in flexible retention handling, deduplication even for partial changes, compression, encryption so you don’t have to trust the backup target and more.
dividuum··on Stations and transfers (2022)
Mong Kok in Hong Kong is the first I’ve seen these type of cross-platform interchange: https://en.wikipedia.org/wiki/Mong_Kok_station
dividuum··on How video games use lookup tables
Color palette definitely counts. I remember the lookup table Quake used to map its 256 color VGA palette to itself to implement light levels: https://quakewiki.org/wiki/Quake_palette#Colormap

You now basically have a two step lookup: palette_rgb[colormap[color, light]]

dividuum··on Coroutines in C (2000)
The alternative is to use the „labels as values“ feature of GCC. You can take the address of a label and later jump to it. I contributed the code that’s now in lc-addrlabels.h back in 2005 :-)

I also used the GCC local labels feature to completely avoid using __LINE__ anywhere, so you could have multiple coReturns in a single code line:

#define LC_SET(s) do { ({ __label__ resume; resume: (s) = &&resume; }); }while(0)

dividuum··on Considerations for a long-running Raspberry Pi
Sounds reasonable, but the secure boot mechanism of the Pi not only allows verifying the boot chain but also enables you to implement disk encryption with keys stored in the the hardware itself that you can then only access from the running OS. Stealing the Pi or just taking out the SD card will not allow access to the non-OS parts. I'm not sure if the secure boot stuff of the Pi has ever been thoroughly verified or exposed to serious attacks, but in theory that's all possible.
dividuum··on Considerations for a long-running Raspberry Pi
True, but now I’m curious what kind of cryptographic operation you’re doing that would need to be protected from local root. Because that should be the only case a TPM is helpful (compared to the Pi secure boot option) and in that case the device is compromised anyway and can show anything on the screen and have all local processes taken over.

Agreed on the web stuff. But I’d say the web sucks, not the Pi. :-)

dividuum··on Considerations for a long-running Raspberry Pi
Fellow Raspberry Pi digital signage CEO here :). Surprised you didn’t mention the secure boot support, available since the Pi4, in your talk. While our service doesn’t use it (yet?) it sounds quite solid on paper and allows you to protect the data on disk/SD.

We’re still pretty happy with the Pi and the move to more open source APIs (Mesa/DRM/KMS/FFmpeg) is, now that they are finally in a state they feel usable, really promising. As our main use case is still digital signage, the raw processes power isn’t really that relevant as the expensive part (video decoding) is obviously accelerated and the backwards compatibility that’s possible with the Pi is awesome. We still have customers running Pi1B+ devices continuously for almost 10 years with the latest OS release we provide.

dividuum··on Ask HN: Does Cloudflare block HN comments if you have code blocks in a reply?
Yep. Without leaving the browser, https://news.ycombinator.com/cdn-cgi/trace confirms that.
dividuum··on Sourcehut and Codeberg are both currently experiencing a DDoS attack
Or if you need another antique example: opentnl, the network library use in a 2001 released game Tribes 2 had „client puzzles“ (aka PoW): https://github.com/kocubinski/opentnl/blob/master/tnl/client...
dividuum··on 3D Map of Shinjuku Station in Three.js
Why limit yourself to walking when you can build them :)

https://store.steampowered.com/app/1122120/STATIONflow/

dividuum··on What Is OIDC?
Not saying this isn't true, but wtf? How could such a laughable number of users cause any kind of performance issue?
dividuum··on Google OAuth is broken (sort of)
Why is it even possible to create a new Google account with an email like 'user+suffix@domain' if 'user@domain' is already handled by google's mail servers and thus applies the plus-routing rules? Even in the non-exploity case that seems like a great way to create confusing mail setups.
dividuum··on GitMounter: A FUSE filesystem for Git repositories
It should automatically map all the commits of each file to .old, .older, .old2.old and so on. For the true „version management in a file system“ feeling :-)
dividuum··on Building an occupancy sensor with a $5 ESP32 and a serverless DB
I do something like that for my home assistant: I have a few shelly smart plugs that can scan BLE. They filter for apple watches and send the MAC and RSSI to my home assistant where a small neural net then tries to detect the location within my apartment. It works better than I expected given the high variance of signal strength, even when standing still.
dividuum··on Ask HN: How would French police locate suspects by tapping their devices?
Precursor (https://www.crowdsupply.com/sutajio-kosagi/precursor) is interesting with its use of an FPGA.
dividuum··on A Grand Theft Auto III Re-Implementation
There's Retro City Rampage (which also has a DOS version) and Shakedown Hawaii.
dividuum··on Getting my library cards onto my phone the hard way
Pass4wallet is a nice app for that, if you’re ok with your pass data being (according to their privacy policy) sent to their server, signed and then deleted.
dividuum··on My Google Play Developer account has been terminated
Maybe those platforms should take a little cut from any income they make from apps to pay for more oversight and developer support… Oh
dividuum··on iCloud Drive silently deletes your content
Facetime supports screen sharing: https://support.apple.com/en-us/HT212734
dividuum··on Valve is a wonderful upstream contributor to Linux and the open-source community
I'm incredibly fearful of the day Valve's leadership changes at some point. They really are one of the few bigger players (heh) in the gaming industry that's not driven by corporate greed.
dividuum··on 9/11 in Realtime
Youtube link: https://www.youtube.com/watch?v=oCPVNLLo-mI
dividuum··on Cerabyte: ceramic storage poised to usher in 'yottabyte era'
Seriously: just buy a station wagon ;)
dividuum··on Block YouTube ads on AppleTV by decrypting and stripping ads from Profobuf
You just know it would end up looking like the TV in idiocrazy after a year.
dividuum··on Os.js – open-source JavaScript web desktop platform with a window manager
You might enjoy Kitboga using that to mess with tech support scammers: https://www.youtube.com/watch?v=F0peLpovDB8 and https://www.youtube.com/watch?v=XxWFdFhHd9U
dividuum··on LuaJIT uses rolling releases
Somewhat difficult to find on the linked list archive, but this exact issue was dicussed there. See the followup mails: https://www.freelists.org/archive/luajit/08-2023?threads=1
← PreviousPage 4 of 24Next →