Comments (4)
Try the HEAD of this repository, otherwise run under valgrind?
from freeradius-client.
Hi,
thanks for your reply. I haven't tried the latest source (from HEAD) yet, but I have noted that there are differences between the version that I am using (freeradius-client-1.1.7) and the version in GIT.
I did run valigrind on my test application for three test cases. One where authentication succeeds, ones where it fails and one where it times out. The test program performs 20 authentication requests, no retries, 1 second timeout. The output is as follows:
Test 1 Authentication success
-bash-3.2# valgrind --leak-check=full ./radexample username1 username1 10.0.97.34 1812 mySecret 0 1 20
==9613== Memcheck, a memory error detector.
==9613== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==9613== Using LibVEX rev 1732, a library for dynamic binary translation.
==9613== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==9613== Using valgrind-3.2.3, a dynamic binary instrumentation framework.
==9613== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==9613== For more details, rerun with: -v
==9613==
Radius Authentication example V1.0
>> Using username of username1 and password of username1
>> Auth Server is (10.0.97.34) on port (1812) using secret (mySecret)
>> number of retries is 0 and the response timeout is 1 seconds loopcount = 20
Start auth request 0: username1 username1 1812
0 0: Authentication requested started on thread 0
Waiting 1 1 1 1....
Processing Authentication result for thread 0
Authentication succeded
Start auth request 0: username1 username1 1812
0 1: Authentication requested started on thread 0
Waiting 1 1 1 1....
Processing Authentication result for thread 0
Authentication succeded
Start auth request 0: username1 username1 1812
0 2: Authentication requested started on thread 0
Waiting 1 1 1 1....
Processing Authentication result for thread 0
Authentication succeded
0 19: Authentication requested started on thread 0
Waiting 1 1 1 1....
Processing Authentication result for thread 0
Authentication succeded
==9613==
==9613== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 21 from 1)
==9613== malloc/free: in use at exit: 880 bytes in 5 blocks.
==9613== malloc/free: 4,052 allocs, 4,047 frees, 479,791 bytes allocated.
==9613== For counts of detected errors, rerun with: -v
==9613== searching for pointers to 5 not-freed blocks.
==9613== checked 399,268 bytes.
==9613==
==9613== LEAK SUMMARY:
==9613== definitely lost: 0 bytes in 0 blocks.
==9613== possibly lost: 0 bytes in 0 blocks.
==9613== still reachable: 880 bytes in 5 blocks.
==9613== suppressed: 0 bytes in 0 blocks.
==9613== Reachable blocks (those to which a pointer was found) are not shown.
==9613== To see them, rerun with: --leak-check=full --show-reachable=yes
-bash-3.2#
Test 2 - Authentication Failure
-bash-3.2# valgrind --leak-check=full ./radexample username1 badpasswd 10.0.97.34 1812 mySecret 0 1 20
==9634== Memcheck, a memory error detector.
==9634== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==9634== Using LibVEX rev 1732, a library for dynamic binary translation.
==9634== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==9634== Using valgrind-3.2.3, a dynamic binary instrumentation framework.
==9634== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==9634== For more details, rerun with: -v
==9634==
Radius Authentication example V1.0
>> Using username of username1 and password of badpasswd
>> Auth Server is (10.0.97.34) on port (1812) using secret (mySecret)
>> number of retries is 0 and the response timeout is 1 seconds loopcount = 20
Start auth request 0: username1 badpasswd 1812
0 0: Authentication requested started on thread 0
Waiting 1 1 1 1....
Waiting 1 1 1 1....
Processing Authentication result for thread 0
**** Authentication attempt rejected ****
Start auth request 0: username1 badpasswd 1812
0 1: Authentication requested started on thread 0
Waiting 1 1 1 1....
Waiting 1 1 1 1....
Processing Authentication result for thread 0
**** Authentication attempt rejected ****
0 19: Authentication requested started on thread 0
Waiting 1 1 1 1....
Waiting 1 1 1 1....
Processing Authentication result for thread 0
**** Authentication attempt rejected ****
==9634==
==9634== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 21 from 1)
==9634== malloc/free: in use at exit: 880 bytes in 5 blocks.
==9634== malloc/free: 4,052 allocs, 4,047 frees, 479,791 bytes allocated.
==9634== For counts of detected errors, rerun with: -v
==9634== searching for pointers to 5 not-freed blocks.
==9634== checked 399,268 bytes.
==9634==
==9634== LEAK SUMMARY:
==9634== definitely lost: 0 bytes in 0 blocks.
==9634== possibly lost: 0 bytes in 0 blocks.
==9634== still reachable: 880 bytes in 5 blocks.
==9634== suppressed: 0 bytes in 0 blocks.
==9634== Reachable blocks (those to which a pointer was found) are not shown.
==9634== To see them, rerun with: --leak-check=full --show-reachable=yes
Test 3 - Authentication Timed out
-bash-3.2# valgrind --leak-check=full ./radexample username1 username1 10.0.97.35 1812 mySecret 0 1 20
==9655== Memcheck, a memory error detector.
==9655== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==9655== Using LibVEX rev 1732, a library for dynamic binary translation.
==9655== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==9655== Using valgrind-3.2.3, a dynamic binary instrumentation framework.
==9655== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==9655== For more details, rerun with: -v
==9655==
Radius Authentication example V1.0
>> Using username of username1 and password of username1
>> Auth Server is (10.0.97.35) on port (1812) using secret (mySecret)
>> number of retries is 0 and the response timeout is 1 seconds loopcount = 20
Start auth request 0: username1 username1 1812
0 0: Authentication requested started on thread 0
Waiting 1 1 1 1....
Waiting 1 1 1 1....
Processing Authentication result for thread 0
**** Authentication attempt timed out ****
Start auth request 0: username1 username1 1812
0 1: Authentication requested started on thread 0
Waiting 1 1 1 1....
Waiting 1 1 1 1....
Processing Authentication result for thread 0
**** Authentication attempt timed out ****
0 19: Authentication requested started on thread 0
Waiting 1 1 1 1....
Waiting 1 1 1 1....
Processing Authentication result for thread 0
**** Authentication attempt timed out ****
==9655==
==9655== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 23 from 1)
==9655== malloc/free: in use at exit: 21,396 bytes in 26 blocks.
==9655== malloc/free: 4,364 allocs, 4,338 frees, 857,862 bytes allocated.
==9655== For counts of detected errors, rerun with: -v
==9655== searching for pointers to 26 not-freed blocks.
==9655== checked 399,268 bytes.
==9655==
==9655== 36 bytes in 1 blocks are definitely lost in loss record 4 of 7
==9655== at 0x40214B0: malloc (vg_replace_malloc.c:149)
==9655== by 0x4160E69: nss_parse_service_list (in /lib/libc-2.5.1.so)
==9655== by 0x416170F: __nss_database_lookup (in /lib/libc-2.5.1.so)
==9655== by 0x41625BE: __nss_hosts_lookup (in /lib/libc-2.5.1.so)
==9655== by 0x4165F69: gethostbyaddr_r@@GLIBC_2.1.2 (in /lib/libc-2.5.1.so)
==9655== by 0x4032727: rc_gethostbyaddr (ip_util.c:101)
==9655== by 0x40327A6: rc_ip_hostname (ip_util.c:212)
==9655== by 0x402DEB4: rc_send_server (sendserver.c:377)
==9655== by 0x402C882: rc_aaa (buildreq.c:136)
==9655== by 0x402CD1A: rc_auth (buildreq.c:193)
==9655== by 0x80490E9: post_authentication_request (in /work/radius/freeradius-client-1.1.7/src/kevin/radexample)
==9655== by 0x408062A: start_thread (in /lib/libpthread-2.5.1.so)
==9655==
==9655==
==9655== 20,480 bytes in 20 blocks are definitely lost in loss record 7 of 7
==9655== at 0x40214B0: malloc (vg_replace_malloc.c:149)
==9655== by 0x403274D: rc_gethostbyaddr (ip_util.c:95)
==9655== by 0x40327A6: rc_ip_hostname (ip_util.c:212)
==9655== by 0x402DEB4: rc_send_server (sendserver.c:377)
==9655== by 0x402C882: rc_aaa (buildreq.c:136)
==9655== by 0x402CD1A: rc_auth (buildreq.c:193)
==9655== by 0x80490E9: post_authentication_request (in /work/radius/freeradius-client-1.1.7/src/kevin/radexample)
==9655== by 0x408062A: start_thread (in /lib/libpthread-2.5.1.so)
==9655== by 0x4151D5D: clone (in /lib/libc-2.5.1.so)
==9655==
==9655== LEAK SUMMARY:
==9655== definitely lost: 20,516 bytes in 21 blocks.
==9655== possibly lost: 0 bytes in 0 blocks.
==9655== still reachable: 880 bytes in 5 blocks.
==9655== suppressed: 0 bytes in 0 blocks.
==9655== Reachable blocks (those to which a pointer was found) are not shown.
==9655== To see them, rerun with: --leak-check=full --show-reachable=yes
I will try the latest code tomorrow.
Kevin
from freeradius-client.
This version did indeed seem to resolve the memory leak issue.
It also required some additional lines to be added to /etc/services for the radius client
Thanks for the help
from freeradius-client.
This issue should be closed.
from freeradius-client.
Related Issues (20)
- Encryption of CHAP-password HOT 2
- BUG: Dictionary attributes compared against UINT8_MAX HOT 3
- dictionary.sip cannot be used due to large attibute values HOT 5
- Is there a Java version for freeradius? HOT 1
- Does freeRadius support EAP_AKA? HOT 1
- I want use OTP two factor authentication HOT 2
- Does this library has plan to support windows ? HOT 1
- User-password and shared secret limits too low, should be 128. HOT 2
- configure.in contains a check that isn't C99 compliant as it's main function lacks a return type.
- Is there an openwrt package HOT 1
- Error in 1.1.8 when there is no entry for radius port in /etc/services HOT 1
- Bump up shared secret limit to 512? HOT 2
- Incorrect upper limit of 8k in config file HOT 1
- rc_avpair_tostr() crashes on bad PW_TYPE_DATE data HOT 1
- freeradius-clinet that supports PAM & PEAP/TLS-EAP HOT 1
- getaddrinfo memory leaks
- attribute issue with windows using dictionary.microsoft after successful connection in PPTP HOT 1
- Accounting only configuration HOT 3
- Freeradius Mssql DB HOT 1
- Facing Issue While Vendor Specific Configuration HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from freeradius-client.