Skip to content

[Security] Use safe integer arithmetic for memory allocation #19257

Closed
dotnet/corefx
#13553

Description

@jkotas

Native shims have potential integer overflows around memory allocations, for example:

https://github.com/dotnet/corefx/blob/edd3b840988c9ed8d572bf115926d798c8e3fc52/src/Native/Unix/System.Native/pal_networking.cpp#L2622

There should be manual checks for potential integer overflow; or strongly typed new (nothrow) that checks for multiplication overflows underneath should be used instead.

Activity

  1. changed the title [-]Use safe integer arithmetic for memory allocation[/-] [+][Security] Use safe integer arithmetic for memory allocation[/+] on Nov 5, 2016
  2. self-assigned this
    on Nov 10, 2016
  3. transferred this issue fromdotnet/corefxon Jan 31, 2020
  4. added this to the 2.0.0 milestone on Jan 31, 2020
  5. ghost locked as resolved and limited conversation to collaborators on Dec 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-Metabugos-linux

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions