[krbdev.mit.edu #8704] Resource leak in read_secret_file()

Bean Zhang via RT rt-comment at KRBDEV-PROD-APP-1.mit.edu
Wed Jun 20 10:54:47 EDT 2018


Hi Team,

In read_secret_file() of krb5-1.16.1/src/plugins/preauth/otp/otp_state.c,
When calls k5_path_join(), will store the allocated memory to filename,
later if this function returns, it does not free the memory filename points to.

The fix is to call "free(filename)" before function returns.

Could someone help to take a look?

Thanks,
Bean



More information about the krb5-bugs mailing list