mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
tipc: Fix skb_under_panic when configuring TIPC without privileges
This patch prevents a TIPC configuration command requiring network administrator privileges from triggering an skbuff underrun if it is issued by a process lacking those privileges. The revised error handling code avoids the use of a potentially uninitialized global variable by transforming the unauthorized command into a new command, then following the standard command processing path to generate the required error message. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
dc58c78c04
commit
59f0c4523f
3 changed files with 23 additions and 9 deletions
|
@ -2,7 +2,7 @@
|
|||
* include/linux/tipc_config.h: Include file for TIPC configuration interface
|
||||
*
|
||||
* Copyright (c) 2003-2006, Ericsson AB
|
||||
* Copyright (c) 2005, Wind River Systems
|
||||
* Copyright (c) 2005-2007, Wind River Systems
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -135,6 +135,14 @@
|
|||
#define TIPC_CMD_SET_MAX_SLAVES 0x800A /* tx unsigned, rx none */
|
||||
#define TIPC_CMD_SET_NETID 0x800B /* tx unsigned, rx none */
|
||||
|
||||
/*
|
||||
* Reserved commands:
|
||||
* May not be issued by any process.
|
||||
* Used internally by TIPC.
|
||||
*/
|
||||
|
||||
#define TIPC_CMD_NOT_NET_ADMIN 0xC001 /* tx none, rx none */
|
||||
|
||||
/*
|
||||
* TLV types defined for TIPC
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue