somewhat useless illustration /img/cs/toolbox/status/

logd

Started ~2023-12 Real-time logging (tail & query) for virtually unlimited logs. A map of in-memory ring buffers. Built on UDP & homegrown ephemeral HMAC. Go std lib + Protobuf. Image is built from scratch (Linux kernel + app executable).

2024-05: Looking back, this was an enjoyable project to rediscover writing software. It’s amazing to return to something after a change of mind. A new mind has more fun, and is more productive. The same thing happened when I re-imagined speedflying after my spinal-cord injury. Some years after my recovery, I rediscovered a lost joy with a new mind.

RE quality of this program: Looking back on past work is always funny, I leave this here as it still serves as a journal. Now, I would just run a process that reads the linux journal. Useless abstractions such as loggers pollute the code. This project is a useless abstraction, like most other software.

2024-12: Looking back at this project, I find it amusing to think that I struggled to solve the replay attack vulnerability.

As the protocol is over UDP, each packet must be authenticated. I had tried using a ring-buffer of recent packet hashes, A/B cuckoo filters, and probably other things too. I should have just gone with a sequence counter, incremented and included in each packet. The server can then immediately reject packets that are far behind the sequence counter. A small ring-buffer could then be used to check packets that are slightly behind the sequence counter. This prevents replays, and is far more efficient than a large ring-buffer or A/B cuckoo filters.

I learned of this sequence counter approach when I read through the WireGuard spec.

Repo

https://github.com/intob/logd