Hacker Newsnew | past | comments | ask | show | jobs | submit | sterwill's commentslogin

Over a decade ago, I created an AWS ELB to serve a production API. It was HTTPS-only, using an Amazon-signed certificate served from ACM for my employer's domain. Right after deployment, logs showed a regular pattern of 404s trying to POST/PUT to my API at paths I didn't support. Thousands of requests per hour, and they continued for days. It didn't look like a DoS--the paths looked like someone else's API.

I got curious what all the traffic was, so I added a route to the API that saved some of the uploaded data. It was live home surveillance video and photos! Indoors, outdoors, baby monitors, living rooms, etc. It was pretty easy to find which vendor's hardware was doing this (from headers, paths, watermarks) and I reached out to their security contact to let them know what I found. They responded generically but didn't seem to care that much.

In short, because HTTPS was required, and an ELB gets assigned IPv4 addresses arbitrarily, I can only conclude that a whole fleet of home security cameras were sold across the US that hard-coded the IP address of their cloud server and had certificate validation disabled.


Does this result in programs more frequently erroring/crashing because they can't allocate? I don't know how well many of the programs I frequently use on my desktop (Firefox, GNOME desktop, JVM + IntelliJ, Slack, etc.) handle allocation failures. I'm not sure they would do much better than crash, but I know the default OOM killer settings work well for me. About once a year a real runaway process (usually a throwaway program I'm working on) gets OOM-killed, and that's fine with me.


Java allowed to handle out-of-memory rather well if one wanted to even 25 years ago. Basically one allocated a buffer on a startup taking 5% of memory that the application was supposed to use and made all threads to catch the oom exception. When handling that the buffer would be released, GC would be forced and a special flag would be set asking app to cancel any memory-intensive tasks until enough memory would be released and the buffer can be allocated again. It worked extremely well.


Yeah, crash ballast is an extremely underrated tool.

It also works for the OOM killer: run a daemon with a child process that holds some fixed amount of memory. Adjust OOM scores of everything else on the system lower than the child. If the parent’s waitpid() returns due to an OOM kill, send an alert/shutdown nonessentials/sync buffers to disk and so on.


Maybe you should skip running a useless child process and just use PSI to monitor memory pressure.


PSI polling is also good, but there’s no substitute for knowing for sure that the OOM killer is awake and hunting.


You can't know when the OOM killer is awake and hunting. The kernel doesn't know that.


The approach I originally described provides a useful early warning system for that condition. It’s not perfect, but has proven useful and better than nothing many times.


> Does this result in programs more frequently erroring/crashing because they can't allocate?

I run Firefox, VSCodium with LSP, Discord, Signal and there's still space left for a game like CS2. I'm not a heavy user by any means.

> I'm not sure they would do much better than crash

I have yet to see a program that silently handles allocation failures and doesn't crash. These days everything is coded to crash if no memory :(

> About once a year a real runaway process (usually a throwaway program I'm working on) gets OOM-killed

In my case it killed system critical processes with no way to recover. With disabled overcommit, it freezes for a while (usually for a minute or two), I close some random program of my choosing and then see in Resource Monitor what's eating my ram.


> I have yet to see a program that silently handles allocation failures and doesn't crash

Postgres handles allocation failures


Same here. I enjoyed Q3A, but I spent so many hours playing TF/MegaTF.


How does grandma install all of that on macOS?


I flew to Belfast in the mid-2000s. I don't remember the security screening as being that unusual (for an American), but the terminal architecture was interesting.


Hearing some of these stories of Belfast its hard to believe. Flew out of both Belfast International and Belfast City airports last year and they are by far the best airports I have ever had the luxury of travelling through.

Out of Belfast I flew into both Heathrow and Stanstead both are fucking miserable ordeals.


I have 2 Reolink PoE cameras, and they just hopped on the network with DHCP and I used a web browser to configure them. No app needed. I did install the app later, once the cameras were safely on their own VLAN, and I could connect to them by internal host name or IP address.


I bought Reolink PoE cameras because they support standard RTSP and I could put them on their own VLAN where they can't get to the Internet. I can still use the Reolink app to view them when I'm on the LAN, or through Wireguard when I'm not. I use ffmpeg to save streams to a big disk. Works great.


I do the same and it works well. But do you see the Reolink app hammering domains of the form p#p#.reolink.com? I have to kill the app between uses it it drains my phone's battery because of this.


I've never looked at what the Android app is doing on the network, but maybe I should. I usually just keep it open for a few minutes when I'm waiting for a delivery or I hear someone ring the doorbell, so I'm not too worried about it piping lots of video to Reolink HQ. I haven't noticed much of a battery drain having used it earlier in the day.


Yeah, this is my idea as well. Good to know that the Reolink app still works locally and via Wireguard, that means I'll have less UI to set up in HomeAssistant.


Not bragging, but I bought the Blender Book!


Same here. I used Debian back in the 90s, switched to Ubuntu for more regular releases, but the ads from apt were the final annoyance. Debian 12 has been excellent.


I hope they stay in it because I love my 1 Gbps Google Fiber service. Install was great, it's super reliable (compared to Spectrum cable Internet), and the price is nice. I don't even own a computer or switch with network ports that can do > 1 Gbps, but 20 to the home is impressive.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: