3 ms·
Quick Analysis for the SSID Format String Bug
- trollied 5y agoBackground from yesterday: https://news.ycombinator.com/item?id=27560438 https://news.ycombinator.com/item?id=27560438
- Diggsey 5y ago> For the exploitability, it doesn’t echo and the rest of the parameters don’t seem like to be controllable. Thus I don’t think this case is exploitable. It's lucky that `CFStringCreateWithFormatAndArguments` doesn't appear to support format specifiers like `%n` which would allow writes, not just reads...
- totorovirus 5y agoif the function doesn't support %n write, then why did it crash?
- goldenkey 5y ago%s would read from a pointer which may cause a memory violation if the pointer is invalid or not in a readable page.
- crazygringo 5y ago> Looks like it’s a format string bug, which is rarely seen nowadays. Wow, indeed. Serious question: how would this not be caught in code review? I mean, kind of the whole point of string formatting functions is that all of the input is given as parameters, not... concatenated to the format string. I'm not surprised someone with little experience would write such a thing. But I am surprised someone wrote it and then someone else approved it. I mean there is nothing subtle or hard to see about this bug. Yikes.
- unanswered 5y agoIt's not hard to get an organization into the state where devs "with little experience" are reviewing and approving each other's code.
- codeflo 5y agoIt's more or less the sad industry default. The surprising thing is that this happens at a company with the software dev experience of Apple, and even there, specifically in the wi-fi code. One might assume that this is an area of iOS that would receive special attention.
- ryanlol 5y ago>> Looks like it’s a format string bug, which is rarely seen nowadays. This strongly suggests that the author has not interacted with any real software for the period of time they’d call “nowadays” In what universe are format string bugs rare?
- olliej 5y agoThey’ve been compiler warnings for a decade+ at this point
- SAI_Peregrinus 5y agoBut not on-by-default compiler warnings. Any new warning with an existing code base generally won't get turned on, because fixing all the bugs it reveals and suppressing false positives would take nonzero effort.
- totorovirus 5y agoThere must have been a warning during compilation, and it seems like apple devs have been ignoring it.