Package: freeradius / 3.0.12+dfsg-5+deb9u1

fr-gv-305.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From de3b3b2e4153db26442facbd5e9b268a3bf795ba Mon Sep 17 00:00:00 2001
From: "Alan T. DeKok" <aland@freeradius.org>
Date: Mon, 3 Jul 2017 19:08:15 -0400
Subject: [PATCH] FR-GV-305 read the correct offset instead of uninitialized
 memory

---
 src/lib/radius.c          | 2 +-
 src/tests/dictionary.test | 1 +
 src/tests/unit/wimax.txt  | 6 ++++++
 3 files changed, 8 insertions(+), 1 deletion(-)

Index: freeradius-3.0.12+dfsg/src/lib/radius.c
===================================================================
--- freeradius-3.0.12+dfsg.orig/src/lib/radius.c
+++ freeradius-3.0.12+dfsg/src/lib/radius.c
@@ -4008,7 +4008,7 @@ ssize_t data2vp(TALLOC_CTX *ctx,
 		break;
 
 	case PW_TYPE_SIGNED:	/* overloaded with vp_integer */
-		memcpy(&vp->vp_integer, buffer, 4);
+		memcpy(&vp->vp_integer, data, 4);
 		vp->vp_integer = ntohl(vp->vp_integer);
 		break;
 
Index: freeradius-3.0.12+dfsg/src/tests/dictionary.test
===================================================================
--- freeradius-3.0.12+dfsg.orig/src/tests/dictionary.test
+++ freeradius-3.0.12+dfsg/src/tests/dictionary.test
@@ -7,4 +7,5 @@ BEGIN-VENDOR TEST
 ATTRIBUTE	Test-Name		1 string
 ATTRIBUTE	Test-Number		2 integer
 ATTRIBUTE	Test-Server-Port	3 integer
+ATTRIBUTE	Test-Signed		4 signed
 END-VENDOR TEST
Index: freeradius-3.0.12+dfsg/src/tests/unit/wimax.txt
===================================================================
--- freeradius-3.0.12+dfsg.orig/src/tests/unit/wimax.txt
+++ freeradius-3.0.12+dfsg/src/tests/unit/wimax.txt
@@ -155,3 +155,9 @@ data WiMAX-Release = "EEEEEEEEEEEEEEEEEE
 decode 1a 0b 00 00 60 b5 31 05 80 00 00
 data Attr-26 = 0x000060b53105800000
 
+encode WiMAX-GMT-Timezone-offset = -1
+data 1a 0d 00 00 60 b5 03 07 00 ff ff ff ff
+
+decode -
+data WiMAX-GMT-Timezone-offset = -1
+