tipc: Abort excessive send requests as early as possible
Adds checks to TIPC's socket send routines to promptly detect and abort attempts to send more than 66,000 bytes in a single TIPC message or more than 2**31-1 bytes in a single TIPC byte stream request. In addition, this ensures that the number of iovecs in a send request does not exceed the limits of a standard integer variable. Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
This commit is contained in:
parent
66e019a6af
commit
c29c3f70c9
2 changed files with 14 additions and 1 deletions
|
@ -101,7 +101,7 @@ static inline unsigned int tipc_node(__u32 addr)
|
|||
* Limiting values for messages
|
||||
*/
|
||||
|
||||
#define TIPC_MAX_USER_MSG_SIZE 66000
|
||||
#define TIPC_MAX_USER_MSG_SIZE 66000U
|
||||
|
||||
/*
|
||||
* Message importance levels
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue