Date: Sat, 23 Sep 2000 18:07:10 -0700 (PDT) From: Kris Kennaway <kris@FreeBSD.org> To: ports@freebsd.org Cc: jmz@freebsd.org, security@freebsd.org Subject: XFree86 3.x DoS patch Message-ID: <Pine.BSF.4.21.0009231756420.99058-200000@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --0-1221069748-969757205=:99058 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-ID: <Pine.BSF.4.21.0009231804091.99058@freefall.freebsd.org> Please test this patch for the XFree86 port - it addresses a number of denial of service/crash conditions in the X code (libraries used by client programs, as well as parts of the server itself). These were reported on bugtraq several months ago but never publically acknowledged by the XFree86 developers, nor did they release a patch against 3.x. They did however fix the problem silently in XFree86 4.x - this patch comes from OpenBSD who tracked down and extracted the relevant patches from the XFree86 CVS repo. I'm not really sure of the impact of the vulnerabilities, but I think they allow users who can connect remotely to an X application using the vulnerable libraries to crash it without authenticating. Bad. Kris -- In God we Trust -- all others must submit an X.509 certificate. -- Charles Forsythe <forsythe@alum.mit.edu> --0-1221069748-969757205=:99058 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME=patch-sec1 Content-Transfer-Encoding: BASE64 Content-ID: <Pine.BSF.4.21.0009231800050.99058@freefall.freebsd.org> Content-Description: Content-Disposition: ATTACHMENT; FILENAME=patch-sec1 U29tZSBwcm9ibGVtcyB3ZXJlIGRpc2NvdmVyZWQgaW4gWDExIGxpYnJhcmll cyB3aGljaCBjYW4gY2F1c2UgRG9TIGluDQpsaWJJQ0UgYW5kIHhkbS4gQWxz byBzb21lIHBvdGllbnRpYWwgYnVmZmVyIG92ZXJmbG93IG1heSBvY2N1ciBp biBYS0INCm9wdGlvbnMgcGFyc2luZyAoYWx0aG91Z2ggdGhleSBjYW4ndCBi ZSBleHBsb2l0ZWQgaW4gT3BlbkJTRCdzIGRlZmF1bHQNCnNld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AyMyAxNTozMToyNyAyMDAwDQpA QCAtNzY5LDcgKzc2OSw3IEBADQogc3RhdGljIGludCB3cml0ZV9hdXRoX2Zp bGUgKHRtcF9uYW0pDQogICAgIGNoYXIgKnRtcF9uYW07DQogew0KLSAgICBG SUxFICpmcDsNCisgICAgRklMRSAqZnAgPSBOVUxMOw0KICAgICBBdXRoTGlz dCAqbGlzdDsNCiANCiAgICAgLyoNCkBAIC03NzgsMTIgKzc3OCw5IEBADQog ICAgIHN0cmNweSAodG1wX25hbSwgeGF1dGhfZmlsZW5hbWUpOw0KICAgICBz dHJjYXQgKHRtcF9uYW0sICItbiIpOwkJLyogZm9yIG5ldyAqLw0KICAgICAo dm9pZCkgdW5saW5rICh0bXBfbmFtKTsNCi0gICAgZnAgPSBmb3BlbiAodG1w X25hbSwgIndiIik7CQkvKiB1bWFzayBpcyBzdGlsbCBzZXQgdG8gMDA3NyAq Lw0KLSAgICBpZiAoIWZwKSB7DQotCWZwcmludGYgKHN0ZGVyciwgIiVzOiAg dW5hYmxlIHRvIG9wZW4gdG1wIGZpbGUgXCIlc1wiXG4iLA0KLQkJIFByb2dy YW1OYW1lLCB0bXBfbmFtKTsNCi0JcmV0dXJuIC0xOw0KLSAgICB9IA0KKyAg ICAvKiBDUGhpcHBzIDIwMDAvMDIvMTIgLSBmaXggZmlsZSB1bmxpbmsvZm9w ZW4gcmFjZSAqLw0KKyAgICBmZCA9IG9wZW4odG1wX25hbSwgT19XUk9OTFl8 T19DUkVBVHxPX0VYQ0wsIDA2MDApOw0KKyAgICBpZiAoZmQgIT0gLTEpIGZw ID0gZmRvcGVuKGZkLCAid2IiKTsNCiANCiAgICAgLyoNCiAgICAgICogV3Jp dGUgTUlULU1BR0lDLUNPT0tJRS0xIGZpcnN0LCBiZWNhdXNlIFI0IFhsaWIg a25vd3MNCg== --0-1221069748-969757205=:99058-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0009231756420.99058-200000>