rapid7 / metasploit-payloads

Unified repository for different Metasploit Framework payloads
Other
1.72k stars 668 forks source link

memory leak in request_sys_config_sysinfo #709

Closed wolfcod closed 3 weeks ago

dledda-r7 commented 2 months ago

Hi @wolfcod, Thanks for your PR! I'm just gonna add some description to your proposed fix.

Issue

Inside the function request_sys_config_sysinfo is present a NetWkstaGetInfo function call. As stated in the documentation, after using the out buffer, the NetApiBufferFree should be called on the buffer in order to be freed. The proposed fix resolves the memory leak.

dledda-r7 commented 3 weeks ago

Release Notes

This fix a memory leak bug in request_sys_config_sysinfo function