Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ppp] [pppd] Add CVE-2015-3310.patch. JB#48797
See ppp-project/ppp#86 and https://git.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/ppp Signed-off-by: Alexey Andreev <a.andreev@omprussia.ru>
- Loading branch information
Alexey Andreev
committed
Feb 4, 2020
1 parent
8fc46a5
commit dfa4a67
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Fix buffer overflow in rc_mksid() | ||
|
||
rc_mksid converts the PID of pppd to hex to generate a pseudo-unique string. | ||
If the process id is bigger than 65535 (FFFF), its hex representation will be | ||
longer than 4 characters, resulting in a buffer overflow. | ||
|
||
The bug can be exploited to cause a remote DoS. | ||
--- ppp-2.4.7/pppd/plugins/radius/util.c | ||
+++ ppp-2.4.7/pppd/plugins/radius/util.c | ||
@@ -77,7 +77,7 @@ rc_mksid (void) | ||
static unsigned short int cnt = 0; | ||
sprintf (buf, "%08lX%04X%02hX", | ||
(unsigned long int) time (NULL), | ||
- (unsigned int) getpid (), | ||
+ (unsigned int) getpid () & 0xFFFF, | ||
cnt & 0xFF); | ||
cnt++; | ||
return buf; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters