aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Percival <cperciva@FreeBSD.org>2010-07-13 02:45:17 +0000
committerColin Percival <cperciva@FreeBSD.org>2010-07-13 02:45:17 +0000
commitd5406806abdc46dbb99934f5001d3b4bf18c8ee4 (patch)
tree57f2fdc6f270e9dd28d48ca4a7a65caed14d18cb
parent62e702af841e9756db93cf070ab4e41652acdb8e (diff)
downloadsrc-d5406806abdc46dbb99934f5001d3b4bf18c8ee4.tar.gz
src-d5406806abdc46dbb99934f5001d3b4bf18c8ee4.zip
Correctly copy the M_RDONLY flag when duplicating a reference
to an mbuf external buffer. Approved by: so (cperciva) Approved by: re (kensmith) Security: FreeBSD-SA-10:07.mbuf
Notes
Notes: svn path=/releng/8.1/; revision=209964
-rw-r--r--UPDATING4
-rw-r--r--sys/kern/uipc_mbuf.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/UPDATING b/UPDATING
index c673ac45e172..4911a6a3a707 100644
--- a/UPDATING
+++ b/UPDATING
@@ -15,6 +15,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.x IS SLOW ON IA64 OR SUN4V:
debugging tools present in HEAD were left in place because
sun4v support still needs work to become production ready.
+20100713: FreeBSD-SA-10:07.mbuf
+ Correctly copy the M_RDONLY flag when duplicating a reference
+ to an mbuf external buffer.
+
20100502:
The config(8) command has been updated to maintain compatibility
with config files from 8.0-RELEASE. You will need a new version
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
index 85e0e3955281..71ee398cf048 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -302,6 +302,7 @@ mb_dupcl(struct mbuf *n, struct mbuf *m)
n->m_ext.ref_cnt = m->m_ext.ref_cnt;
n->m_ext.ext_type = m->m_ext.ext_type;
n->m_flags |= M_EXT;
+ n->m_flags |= m->m_flags & M_RDONLY;
}
/*