Kernel buffer overflow exposes iPhone 11 Pro to radio based attacks

Paulo Pinto pjmlp at progtools.org
Wed Dec 2 19:21:02 UTC 2020


On Wednesday, 2 December 2020 at 15:04:29 UTC, IGotD- wrote:
> On Wednesday, 2 December 2020 at 12:32:02 UTC, M.M. wrote:
>>
>> Oh, OK, I see. I was thinking that modern C++ would be equally 
>> suitable as D or Rust or any other "modern" language of that 
>> sort. But what you explain give me a different view on that.
>
> I also forgot to mention that when there is an out of bound 
> access, both C++ and D throw an exception. Exceptions are 
> usually a big no no in kernels because the potential memory 
> allocation. In kernels you want to reduce and have absolute 
> control over memory allocations. Only the new proposal "lean 
> exceptions" in C++ might be interesting for kernels.

C++ can throw an exception IIF either at() was used, or the STL 
was compiled with exceptions enabled for operator[]() and the 
developer aren't using C style arrays in any place of the code.

Otherwise it will corrupt memory just like C, and no exception 
will be thrown no matter what.


More information about the Digitalmars-d mailing list