News for hackers. Stuff that matters.

pgy

Re:Hacking with environment variables on Tuesday July 14, 2020 @07:15AM (#23830559)
More recently at SpamAndFlags CTF there was a similar challenge, where an innocent looking shell script was to be exploited multiple times, each time by a different environment variable. There is a nice writeup at https://github.com/p4-team/ctf/tree/master/2020-05-10-spam-a...
Re:Tell HN: C Experts Panel – Ask us anything about C on Wednesday April 15, 2020 @07:35AM (#22876564)
Please correct me if I am wrong, but I think here the optimization is possible because "* p = 2" is UB, because the compiler can assume that "p" points to invalid memory. For this assumption, the compiler must know that "realloc" invalidates its first argument.

How does it know that? The definition of "realloc" lives in the source of "libc.so", so the compiler should not be able to see into it. Its declaration in "malloc.h" does not have any special attributes. Does the standard and/or the compiler handles "realloc" differently from other functions?

edit:

It looks like clang inserts a "noalias" attribute to the declaration of "realloc" in the LLVM IR, so it seems it does handle "realloc" specially.

    declare dso_local noalias i8* @realloc(i8* nocapture, i64) local_unnamed_addr #3
Re:Firefox about:config privacy settings on Saturday September 08, 2018 @03:03PM (#17942244)
My favorite about:config setting is browser.tabs.closeWindowWithLastTab=false, it keeps Firefox open when all the tabs are closed.
Re:QIRA is a timeless debugger on Saturday January 30, 2016 @06:44AM (#11001526)
My "uhh... no" moment was when I got this message after manually installing the dependencies* and runnig gira:

    > WTF you use Firefox?!?
    > Go download a real web browser, like Chrome, and try this again
* qemu, python2, flask, flask-socketio, gevent, libcapstone3 and qiradb (in the project root)
Re:The random number generator of DOOM on Wednesday July 01, 2015 @03:40AM (#9810475)
There was a post about tampering with randomness in Doom some time ago with some interesting hn comments explaining the reason for this design: https://news.ycombinator.com/item?id=9429889
In my boyhood I had been fascinated by science fiction short stories, many of them I found in anthologies published in the middle of the 20th century in America. Being born in a non English-speaking country, I soon run out of reading material for translations were hard to find. When I learned English (and connected to the Internet the first time) I tried to find more from my favourite authors but with little luck.

When talking about the disappearance of books, Isaac Asimov's Great SF Stories anthology series[1] always comes to my mind. Around 2006 I spent a whole week searching for it - of the 25 books I managed to find only four or five.

Nevertheless, I assembled a pretty big (and pretty illegal) collection of nearly-impossible-to-find sci-fi stories during my days in high school, but lost it when my computer went wrong a few years later. (I am sure I could have recovered them somehow, but back then I had no idea.) Last year I tried to reassemble my collection but I gave up, it would have been too much work.

[1]: https://en.wikipedia.org/wiki/Category:Isaac_Asimov%27s_Grea...