Unix Technical Forum

Small pf_ioctl.c input checking diff

This is a discussion on Small pf_ioctl.c input checking diff within the mailing.openbsd.tech forums, part of the OpenBSD category; --> Hi, diff -u -10 -r1.186 pf_ioctl.c --- pf_ioctl.c 27 Sep 2007 22:24:05 -0000 1.186 +++ pf_ioctl.c 27 Nov 2007 ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > mailing.openbsd.tech

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-18-2008, 09:34 AM
Max Laier
 
Posts: n/a
Default Small pf_ioctl.c input checking diff

Hi,

diff -u -10 -r1.186 pf_ioctl.c
--- pf_ioctl.c 27 Sep 2007 22:24:05 -0000 1.186
+++ pf_ioctl.c 27 Nov 2007 13:23:49 -0000
@@ -1955,20 +1955,21 @@
/*
* if this is for a queue, find the discipline and
* copy the necessary fields
*/
if (altq->qname[0] != 0) {
if ((altq->qid = pf_qname2qid(altq->qname)) == 0) {
error = EBUSY;
pool_put(&pf_altq_pl, altq);
break;
}
+ altq->altq_disc = NULL;
TAILQ_FOREACH(a, pf_altqs_inactive, entries) {
if (strncmp(a->ifname, altq->ifname,
IFNAMSIZ) == 0 && a->qname[0] == 0) {
altq->altq_disc = a->altq_disc;
break;
}
}
}

error = altq_add(altq);

Otherwise altq_add is called with the userland supplied value for
altq_disc and could be abused to modify arbitrary kernel memory - in very
limited ways, but still.

--
/"\ Best regards, | mlaier@freebsd.org
\ / Max Laier | ICQ #67774661
X http://pf4freebsd.love2party.net/ | mlaier@EFnet
/ \ ASCII Ribbon Campaign | Against HTML Mail and News

[demime 1.01d removed an attachment of type application/pgp-signature which had a name of signature.asc ]

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:00 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com