mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
htb: fix sign extension bug
[ Upstream commit cbd375567f
]
When userspace passes a large priority value
the assignment of the unsigned value hopt->prio
to signed int cl->prio causes cl->prio to become negative and the
comparison is with TC_HTB_NUMPRIO is always false.
The result is that HTB crashes by referencing outside
the array when processing packets. With this patch the large value
wraps around like other values outside the normal range.
See: https://bugzilla.kernel.org/show_bug.cgi?id=60669
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
58055a0058
commit
8da9d4fa43
1 changed files with 1 additions and 1 deletions
|
@ -86,7 +86,7 @@ struct htb_class {
|
|||
unsigned int children;
|
||||
struct htb_class *parent; /* parent class */
|
||||
|
||||
int prio; /* these two are used only by leaves... */
|
||||
u32 prio; /* these two are used only by leaves... */
|
||||
int quantum; /* but stored for parent-to-leaf return */
|
||||
|
||||
union {
|
||||
|
|
Loading…
Reference in a new issue