asdasd

About

Username
asdasd
Joined
Visits
248
Last Active
Roles
member
Points
1,785
Badges
1
Posts
5,686
  • Apple prospers as top smartphone seller amid industry decline

    I recall seeing articles on AI years ago that some vendors count sales when a phone is transferred from the manufacturer to the retailer, even if the retailer never gets it into the hands of a consumer. Is this still the case, and is that how we need to read these stats?
    Apple does that when it sells into retail channels as far as I know. Not that they publish their iPhone unit sales anymore.

    This is from an independent group measuring sales, not the companies themselves. 

    20% worldwide is very good for Apple as it looks to me like Apple phones last twice as long as Android phones. 
    muthuk_vanalingamwatto_cobra
  • macOS Sudo vulnerability could give root privileges to any local user

    auxio said:
    asdasd said:

    dewme said:
    asdasd said:
    auxio said:
    Given how long these tools have been around (40+ years in some cases), how relatively simple the code is compared to modern software, and the fact that they're used in server environments, I'm very surprised they haven't been fully security audited by now.
    They aren’t that simple. That’s the problem. They are written in unsafe languages like C and C++ where memory management was up to the code writer. 
    True. Though the problem in sudo is considerably more tricky than just a typical use-after-free or similar. Read the original post about the exploit.
    Actually, it looks like this exploit takes advantage of vulnerabilities in C stdin processing. This underlying functionality is traceable all the way back to the earliest version of C that most C programmers learned from their trusty and very thin K&R language reference. Over the decades more and more functionality has been layered on top of these “primitive” functions, including the fundamental operation of web servers. 

    The real issue imho is that while a lot of underlying legacy code has a long and time tested verification of proper functionality, the code was not designed and has not been updated with sufficient consideration for the existential security threats that have evolved over time. 
    Yes, so something like this: 
     char filename[512];
    
    ...
    filename = getPath(....)
    This works until there is a change in the operating system to allow filenames longer than 512, then it is a vulnerability at worst or a crash. Probably something like this happened for the stdln . I don't think these old codebases can be easily updated to handle reference counting.
    No, these old UNIX tools don't use C++ since it was only in its inception when they were created.  Not to mention the extra memory overhead made it a non-starter at that time.

    As for your example, that's a buffer overflow attack vector.  It's pretty much the top item on the list for security audits: checking all sources of input for possible buffer overflows (or invalid data which could lead to a buffer overflow when parsing it).

    As for memory management and an ownership model, see the system Apple uses in their low level C APIs (Core Foundation).
    That was C, not C++ although it would work in C++. The point about the audit tool is that that buffer wouldn't be an overflow until the returning call started to return a value bigger than 512. To make the audit work they would have to know what all calls, system or not, had changed. That can't be totally automatic. 


    Alex1N
  • macOS Sudo vulnerability could give root privileges to any local user

    auxio said:
    Given how long these tools have been around (40+ years in some cases), how relatively simple the code is compared to modern software, and the fact that they're used in server environments, I'm very surprised they haven't been fully security audited by now.
    They aren’t that simple. That’s the problem. They are written in unsafe languages like C and C++ where memory management was up to the code writer. 
    dewmeRayz2016watto_cobra
  • Apple brings next-hour precipitation to Weather in the UK and Ireland

    MacPro said:
    If it said rain in England every time, it would be right 90% of the time ;)
    Naw. Plenty of places in the US where it’s just as rainy or more rainy than London, or Dublin. However the U.K. and Ireland have very low sunshine. 
    selleringtonwatto_cobra
  • Developers on who can move to Apple Silicon - and who should wait

    There’s plenty of ways to get the time at higher level abstractions using the Date or TimeInterval classes and the only downside is that a change in the settings or locale could result in a negative time elapsed. It depends on how likely you think that is. 

    randominternetperson