Date: Wed, 23 Jan 2019 17:28:39 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343348 - head/sys/dev/ocs_fc Message-ID: <201901231728.x0NHSdqH099506@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <vlad@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");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901231728.x0NHSdqH099506>