webadmin 1.0 NULL pointer dereference

2013.05.30
Risk: Medium
Local: No
Remote: Yes
CVE: N/A
CWE: N/A

A null pointer dereference was found in ZNC 1.0 in the webadmin module which can be triggered by non-admins and cause denial of service[0]. Thanks in advance. References: [0] https://github.com/znc/znc/commit/2bd410ee5570cea127233f1133ea22f25174eb28 [1] https://secunia.com/advisories/53450/ modules/webadmin.cpp @@ -426,7 +426,7 @@ class CWebAdminMod : public CModule { CIRCNetwork* pNetwork = SafeGetNetworkFromParam(WebSock); // Admin||Self Check - if (!spSession->IsAdmin() && (!spSession->GetUser() || spSession->GetUser() != pNetwork->GetUser())) { + if (!spSession->IsAdmin() && (!spSession->GetUser() || !pNetwork || spSession->GetUser() != pNetwork->GetUser())) { return false; } @@ -455,7 +455,7 @@ class CWebAdminMod : public CModule { CIRCNetwork* pNetwork = SafeGetNetworkFromParam(WebSock); // Admin||Self Check - if (!spSession->IsAdmin() && (!spSession->GetUser() || spSession->GetUser() != pNetwork->GetUser())) { + if (!spSession->IsAdmin() && (!spSession->GetUser() || !pNetwork || spSession->GetUser() != pNetwork->GetUser())) { return false; } @@ -479,7 +479,7 @@ class CWebAdminMod : public CModule { CIRCNetwork* pNetwork = SafeGetNetworkFromParam(WebSock); // Admin||Self Check - if (!spSession->IsAdmin() && (!spSession->GetUser() || spSession->GetUser() != pNetwork->GetUser())) { + if (!spSession->IsAdmin() && (!spSession->GetUser() || !pNetwork || spSession->GetUser() != pNetwork->GetUser())) { return false; } @@ -493,7 +493,7 @@ class CWebAdminMod : public CModule { CIRCNetwork* pNetwork = SafeGetNetworkFromParam(WebSock); // Admin||Self Check - if (!spSession->IsAdmin() && (!spSession->GetUser() || spSession->GetUser() != pNetwork->GetUser())) { + if (!spSession->IsAdmin() && (!spSession->GetUser() || !pNetwork || spSession->GetUser() != pNetwork->GetUser())) { return false; }

References:

https://github.com/znc/znc/commit/2bd410ee5570cea127233f1133ea22f25174eb28#L0L426
https://secunia.com/advisories/53450/


Vote for this issue:
50%
50%


 

Thanks for you vote!


 

Thanks for you comment!
Your message is in quarantine 48 hours.

Comment it here.


(*) - required fields.  
{{ x.nick }} | Date: {{ x.ux * 1000 | date:'yyyy-MM-dd' }} {{ x.ux * 1000 | date:'HH:mm' }} CET+1
{{ x.comment }}

Copyright 2024, cxsecurity.com

 

Back to Top