summaryrefslogtreecommitdiff
path: root/emulators/qemu-devel/files/patch-90_security
diff options
context:
space:
mode:
authorJuergen Lock <nox@FreeBSD.org>2010-01-17 16:20:56 +0000
committerJuergen Lock <nox@FreeBSD.org>2010-01-17 16:20:56 +0000
commitd4e517700042730d5420402bec25ccfa88fed6c8 (patch)
treefa8e73dd336e8f03ab2c5b0677215cf74cc8885a /emulators/qemu-devel/files/patch-90_security
parentAdd cl-trivial-features, which ensures consistent *FEATURES* across multiple (diff)
Finally bring qemu 0.12.1 into ports as the new emulators/qemu-devel,
release announcement is here: http://lists.gnu.org/archive/html/qemu-devel/2009-12/msg02151.html Quoting from pkg-message: - kqemu is no longer supported in qemu upstream after the 0.11 branch was created, which means also not in this version. (Linux has moved on to kvm now for qemu(-like) virtualization needs, so if you want qemu to go faster and don't want to switch to virtualbox or stick to the older emulators/qemu port which is at 0.11.1 atm and as such still supports kqemu you should help getting the FreeBSD kvm port updated and completed: http://wiki.freebsd.org/FabioChecconi/PortingLinuxKVMToFreeBSD )
Notes
Notes: svn path=/head/; revision=248018
Diffstat (limited to 'emulators/qemu-devel/files/patch-90_security')
-rw-r--r--emulators/qemu-devel/files/patch-90_security94
1 files changed, 0 insertions, 94 deletions
diff --git a/emulators/qemu-devel/files/patch-90_security b/emulators/qemu-devel/files/patch-90_security
index 40a5b54c66db..4df76e9b5e39 100644
--- a/emulators/qemu-devel/files/patch-90_security
+++ b/emulators/qemu-devel/files/patch-90_security
@@ -80,100 +80,6 @@ Index: qemu-0.8.2/hw/sb16.c
}
return dma_pos;
-Index: qemu-0.8.2/slirp/slirp.c
-===================================================================
---- qemu-0.8.2.orig/slirp/slirp.c 2006-07-22 20:23:34.000000000 +0300
-+++ qemu-0.8.2/slirp/slirp.c 2007-04-20 06:05:59.000000000 +0300
-@@ -611,6 +611,10 @@ void slirp_input(const uint8_t *pkt, int
- if (!m)
- return;
- /* Note: we add to align the IP header */
-+ /* taviso: large values in ne2k TCNT register may exceed msize on transmit */
-+ if (M_FREEROOM(m) < pkt_len + 2) {
-+ m_inc(m, pkt_len + 2);
-+ }
- m->m_len = pkt_len + 2;
- memcpy(m->m_data + 2, pkt, pkt_len);
-
-Index: qemu-0.8.2/target-i386/translate.c
-===================================================================
---- qemu-0.8.2.orig/target-i386/translate.c 2006-07-22 20:23:34.000000000 +0300
-+++ qemu-0.8.2/target-i386/translate.c 2007-04-20 06:05:59.000000000 +0300
-@@ -5292,6 +5297,7 @@ static target_ulong disas_insn(DisasCont
- gen_jmp_im(pc_start - s->cs_base);
- gen_op_into(s->pc - pc_start);
- break;
-+#ifdef WANT_ICEBP
- case 0xf1: /* icebp (undocumented, exits to external debugger) */
- #if 1
- gen_debug(s, pc_start - s->cs_base);
-@@ -5301,6 +5307,7 @@ static target_ulong disas_insn(DisasCont
- cpu_set_log(CPU_LOG_INT | CPU_LOG_TB_IN_ASM);
- #endif
- break;
-+#endif /* icebp */
- case 0xfa: /* cli */
- if (!s->vm86) {
- if (s->cpl <= s->iopl) {
-Index: qemu-0.8.2/vl.c
-===================================================================
---- qemu-0.8.2.orig/vl.c 2007-04-20 06:05:59.000000000 +0300
-+++ qemu-0.8.2/vl.c 2007-04-20 06:05:59.000000000 +0300
-@@ -3139,8 +3139,8 @@ typedef struct NetSocketState {
- VLANClientState *vc;
- int fd;
- int state; /* 0 = getting length, 1 = getting data */
-- int index;
-- int packet_len;
-+ unsigned int index;
-+ unsigned int packet_len;
- uint8_t buf[4096];
- struct sockaddr_in dgram_dst; /* contains inet host and port destination iff connectionless (SOCK_DGRAM) */
- } NetSocketState;
-@@ -3171,7 +3171,8 @@ static void net_socket_receive_dgram(voi
- static void net_socket_send(void *opaque)
- {
- NetSocketState *s = opaque;
-- int l, size, err;
-+ int size, err;
-+ unsigned l;
- uint8_t buf1[4096];
- const uint8_t *buf;
-
-@@ -3210,7 +3211,15 @@ static void net_socket_send(void *opaque
- l = s->packet_len - s->index;
- if (l > size)
- l = size;
-- memcpy(s->buf + s->index, buf, l);
-+ if (s->index + l <= sizeof(s->buf)) {
-+ memcpy(s->buf + s->index, buf, l);
-+ } else {
-+ fprintf(stderr, "serious error: oversized packet received,"
-+ "connection terminated.\n");
-+ s->state = 0;
-+ goto eoc;
-+ }
-+
- s->index += l;
- buf += l;
- size -= l;
-Index: qemu/block.c
-@@ -539,8 +539,15 @@
- return -ENOMEDIUM;
- if (bs->read_only)
- return -EACCES;
-+ if (sector_num < 0)
-+ return -EACCES;
- if (sector_num == 0 && bs->boot_sector_enabled && nb_sectors > 0) {
- memcpy(bs->boot_sector_data, buf, 512);
-+ }
-+ {
-+ unsigned int ns = sector_num * 512;
-+ if (ns < 0)
-+ return -EACCES;
- }
- if (drv->bdrv_pwrite) {
- int ret, len;
Index: qemu/hw/i8259.c
@@ -302,7 +302,8 @@
s->init4 = val & 1;