Add mitigation for DDOS attack 59/309859/2
authorTomasz Swierczek <t.swierczek@samsung.com>
Wed, 17 Apr 2024 11:48:46 +0000 (13:48 +0200)
committerTomasz Swierczek <t.swierczek@samsung.com>
Wed, 17 Apr 2024 12:34:23 +0000 (14:34 +0200)
commita21ae6f2e45a3a91e988bc1bda35de874b4237f7
tree75ee6f891310d73311cb7756df8ddb7c08e5be5a
parent618141e1de3cdf071cb55fca6192514a7db2e84c
Add mitigation for DDOS attack

Adversary can send too big message to the daemon,
making it fail on allocation. Few places were required
to be enhanced with catch for std::bad_alloc & proper
graceful closing of connection instead of terminating
the process.

Change-Id: Id05dd3ee3d323a8d47ba93e33fae9d9bc6bb255d
src/common/channel.cpp
src/common/connection.cpp
src/server/main/socket-manager.cpp