Fix overflow issues in PacketBufferHandle allocation (#4639)
Fix overflow issues in PacketBufferHandle allocation (#4639)

#### Problem

`NewWithData` does:

```
        buffer.mBuffer->len = buffer.mBuffer->tot_len = static_cast<uint16_t>(aDataSize);
```

but never checks that `aDataSize` fits in `uint16_t`.

Also, there's no check for `aDataSize + aAdditionalSize` overflowing.

In `New`, there are static asserts about safety of addition that make sense if the arguments are all `uint16_t`, but the `aAvailableSize` argument got changed back to `size_t`, so we can overflow when computing `lAllocSize` or `lBlockSize` and under-allocate the buffer, leading to security issues.

#### Summary of Changes

* `New` checks that `aAvailableSize` fits in `uint16_t`.
* `NewWithData` checks that `aDataSize` fits in `uint16_t`.

Fixes #4637 - PacketBufferHandle::NewWithData and PacketBufferHandle::New have integer overflow issues
nestlabs/connectedhomeip,nestlabs/connectedhomeip,nestlabs/connectedhomeip,project-chip/connectedhomeip,project-chip/connectedhomeip,project-chip/connectedhomeip,nestlabs/connectedhomeip,project-chip/connectedhomeip,project-chip/connectedhomeip,project-chip/connectedhomeip,nestlabs/connectedhomeip,nestlabs/connectedhomeip,nestlabs/connectedhomeip