Commit 17ad73e
AX.25: Prevent integer overflows in connect and sendmsg
We recently added some bounds checking in ax25_connect() and
ax25_sendmsg() and we so we removed the AX25_MAX_DIGIS checks because
they were no longer required.
Unfortunately, I believe they are required to prevent integer overflows
so I have added them back.
Fixes: 8885bb0 ("AX.25: Prevent out-of-bounds read in ax25_sendmsg()")
Fixes: 2f2a7ff ("AX.25: Fix out-of-bounds read in ax25_connect()")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent e6827d1 commit 17ad73e
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1188 | 1188 | | |
1189 | 1189 | | |
1190 | 1190 | | |
| 1191 | + | |
1191 | 1192 | | |
1192 | 1193 | | |
1193 | 1194 | | |
| |||
1509 | 1510 | | |
1510 | 1511 | | |
1511 | 1512 | | |
1512 | | - | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
1513 | 1516 | | |
1514 | 1517 | | |
1515 | 1518 | | |
| |||
0 commit comments