doc/share/security/patches/SA-05:08/kmem5x.patch
Bjoern A. Zeeb 3571e53040 Import FreeBSD Security Advisories and Errata Notices, as well as their
patches for easier mirroring, to eliminate a special copy, to make
www.freebsd.org/security a full copy of security.freebsd.org and be
eventually be the same.

For now files are just sitting there.   The symlinks are missing.

Discussed on:	www (repository location)
Discussed with:	simon (so)
2012-08-15 06:19:40 +00:00

154 lines
5.6 KiB
Diff

Index: sys/kern/subr_bus.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/subr_bus.c,v
retrieving revision 1.156.2.6
diff -u -p -r1.156.2.6 subr_bus.c
--- sys/kern/subr_bus.c 14 Apr 2005 04:54:15 -0000 1.156.2.6
+++ sys/kern/subr_bus.c 5 May 2005 04:27:26 -0000
@@ -3785,6 +3785,7 @@ sysctl_devices(SYSCTL_HANDLER_ARGS)
/*
* Populate the return array.
*/
+ bzero(&udev, sizeof(udev));
udev.dv_handle = (uintptr_t)dev;
udev.dv_parent = (uintptr_t)dev->parent;
if (dev->nameunit == NULL)
@@ -3856,6 +3857,7 @@ sysctl_rman(SYSCTL_HANDLER_ARGS)
* resource manager.
*/
if (res_idx == -1) {
+ bzero(&urm, sizeof(urm));
urm.rm_handle = (uintptr_t)rm;
strlcpy(urm.rm_descr, rm->rm_descr, RM_TEXTLEN);
urm.rm_start = rm->rm_start;
@@ -3871,6 +3873,7 @@ sysctl_rman(SYSCTL_HANDLER_ARGS)
*/
TAILQ_FOREACH(res, &rm->rm_list, r_link) {
if (res_idx-- == 0) {
+ bzero(&ures, sizeof(ures));
ures.r_handle = (uintptr_t)res;
ures.r_parent = (uintptr_t)res->r_rm;
ures.r_device = (uintptr_t)res->r_dev;
Index: sys/kern/vfs_subr.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/vfs_subr.c,v
retrieving revision 1.522.2.4
diff -u -p -r1.522.2.4 vfs_subr.c
--- sys/kern/vfs_subr.c 1 Mar 2005 11:32:31 -0000 1.522.2.4
+++ sys/kern/vfs_subr.c 5 May 2005 04:27:32 -0000
@@ -2895,6 +2895,7 @@ sysctl_vfs_conflist(SYSCTL_HANDLER_ARGS)
error = 0;
TAILQ_FOREACH(vfsp, &vfsconf, vfc_list) {
+ bzero(&xvfsp, sizeof(xvfsp));
vfsconf2x(vfsp, &xvfsp);
error = SYSCTL_OUT(req, &xvfsp, sizeof xvfsp);
if (error)
@@ -2939,6 +2940,7 @@ vfs_sysctl(SYSCTL_HANDLER_ARGS)
break;
if (vfsp == NULL)
return (EOPNOTSUPP);
+ bzero(&xvfsp, sizeof(xvfsp));
vfsconf2x(vfsp, &xvfsp);
return (SYSCTL_OUT(req, &xvfsp, sizeof(xvfsp)));
}
@@ -2958,6 +2960,7 @@ sysctl_ovfs_conf(SYSCTL_HANDLER_ARGS)
struct ovfsconf ovfs;
TAILQ_FOREACH(vfsp, &vfsconf, vfc_list) {
+ bzero(&ovfs, sizeof(ovfs));
ovfs.vfc_vfsops = vfsp->vfc_vfsops; /* XXX used as flag */
strcpy(ovfs.vfc_name, vfsp->vfc_name);
ovfs.vfc_index = vfsp->vfc_typenum;
Index: sys/net/if_mib.c
===================================================================
RCS file: /home/ncvs/src/sys/net/if_mib.c,v
retrieving revision 1.13.4.1
diff -u -p -r1.13.4.1 if_mib.c
--- sys/net/if_mib.c 31 Jan 2005 23:26:23 -0000 1.13.4.1
+++ sys/net/if_mib.c 5 May 2005 04:27:33 -0000
@@ -90,6 +90,7 @@ sysctl_ifdata(SYSCTL_HANDLER_ARGS) /* XX
return ENOENT;
case IFDATA_GENERAL:
+ bzero(&ifmd, sizeof(ifmd));
strlcpy(ifmd.ifmd_name, ifp->if_xname, sizeof(ifmd.ifmd_name));
#define COPY(fld) ifmd.ifmd_##fld = ifp->if_##fld
Index: sys/netinet/ip_divert.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet/ip_divert.c,v
retrieving revision 1.98.2.2
diff -u -p -r1.98.2.2 ip_divert.c
--- sys/netinet/ip_divert.c 31 Jan 2005 23:26:35 -0000 1.98.2.2
+++ sys/netinet/ip_divert.c 5 May 2005 04:27:34 -0000
@@ -567,6 +567,7 @@ div_pcblist(SYSCTL_HANDLER_ARGS)
inp = inp_list[i];
if (inp->inp_gencnt <= gencnt) {
struct xinpcb xi;
+ bzero(&xi, sizeof(xi));
xi.xi_len = sizeof xi;
/* XXX should avoid extra copy */
bcopy(inp, &xi.xi_inp, sizeof *inp);
Index: sys/netinet/raw_ip.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet/raw_ip.c,v
retrieving revision 1.142.2.4
diff -u -p -r1.142.2.4 raw_ip.c
--- sys/netinet/raw_ip.c 4 Feb 2005 03:22:06 -0000 1.142.2.4
+++ sys/netinet/raw_ip.c 5 May 2005 04:27:35 -0000
@@ -847,6 +847,7 @@ rip_pcblist(SYSCTL_HANDLER_ARGS)
inp = inp_list[i];
if (inp->inp_gencnt <= gencnt) {
struct xinpcb xi;
+ bzero(&xi, sizeof(xi));
xi.xi_len = sizeof xi;
/* XXX should avoid extra copy */
bcopy(inp, &xi.xi_inp, sizeof *inp);
Index: sys/netinet/udp_usrreq.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet/udp_usrreq.c,v
retrieving revision 1.162.2.7
diff -u -p -r1.162.2.7 udp_usrreq.c
--- sys/netinet/udp_usrreq.c 28 Feb 2005 10:16:23 -0000 1.162.2.7
+++ sys/netinet/udp_usrreq.c 5 May 2005 04:27:37 -0000
@@ -611,6 +611,7 @@ udp_pcblist(SYSCTL_HANDLER_ARGS)
inp = inp_list[i];
if (inp->inp_gencnt <= gencnt) {
struct xinpcb xi;
+ bzero(&xi, sizeof(xi));
xi.xi_len = sizeof xi;
/* XXX should avoid extra copy */
bcopy(inp, &xi.xi_inp, sizeof *inp);
Index: sys/kern/uipc_usrreq.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/uipc_usrreq.c,v
retrieving revision 1.154
diff -u -p -r1.154 uipc_usrreq.c
--- sys/kern/uipc_usrreq.c 25 Apr 2005 00:48:04 -0000 1.154
+++ sys/kern/uipc_usrreq.c 6 May 2005 23:56:22 -0000
@@ -1175,7 +1175,7 @@ unp_pcblist(SYSCTL_HANDLER_ARGS)
n = i; /* in case we lost some during malloc */
error = 0;
- xu = malloc(sizeof(*xu), M_TEMP, M_WAITOK);
+ xu = malloc(sizeof(*xu), M_TEMP, M_WAITOK | M_ZERO);
for (i = 0; i < n; i++) {
unp = unp_list[i];
if (unp->unp_gencnt <= gencnt) {
Index: sys/netinet/tcp_subr.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet/tcp_subr.c,v
retrieving revision 1.225
diff -u -p -r1.225 tcp_subr.c
--- sys/netinet/tcp_subr.c 4 May 2005 13:48:44 -0000 1.225
+++ sys/netinet/tcp_subr.c 6 May 2005 23:56:23 -0000
@@ -941,6 +941,8 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS)
if (inp->inp_gencnt <= gencnt) {
struct xtcpcb xt;
caddr_t inp_ppcb;
+
+ bzero(&xt, sizeof(xt));
xt.xt_len = sizeof xt;
/* XXX should avoid extra copy */
bcopy(inp, &xt.xt_inp, sizeof *inp);