Author: markj Date: Wed Jan 23 17:28:39 2019 New Revision: 343348 URL: https://svnweb.freebsd.org/changeset/base/343348
Log: ocs_fc: Ensure that we zero-initialize memory before copying it out. Note that the affected interface is available only to root. admbugs: 765 Reported by: Vlad Tsyrklevich <v...@tsyrklevich.net> Reviewed by: emaste, ram MFC after: 1 day Security: Kernel memory disclosure Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18914 Modified: head/sys/dev/ocs_fc/ocs_mgmt.c Modified: head/sys/dev/ocs_fc/ocs_mgmt.c ============================================================================== --- head/sys/dev/ocs_fc/ocs_mgmt.c Wed Jan 23 16:44:21 2019 (r343347) +++ head/sys/dev/ocs_fc/ocs_mgmt.c Wed Jan 23 17:28:39 2019 (r343348) @@ -851,6 +851,7 @@ ocs_mgmt_firmware_write(ocs_t *ocs, char *name, void * if (arg_out_length > sizeof(status_str)) { arg_out_length = sizeof(status_str); } + ocs_memset(status_str, 0, sizeof(status_str)); ocs_snprintf(status_str, arg_out_length, "%d", change_status); if (ocs_copy_to_user(arg_out, status_str, arg_out_length)) { ocs_log_test(ocs, "copy to user failed for change_status\n"); _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"