From owner-freebsd-audit Sat Nov 25 23: 5:14 2000 Delivered-To: freebsd-audit@freebsd.org Received: from citusc17.usc.edu (citusc17.usc.edu [128.125.38.177]) by hub.freebsd.org (Postfix) with ESMTP id 9D98F37B4C5; Sat, 25 Nov 2000 23:05:12 -0800 (PST) Received: (from kris@localhost) by citusc17.usc.edu (8.11.1/8.11.1) id eAQ76B116617; Sat, 25 Nov 2000 23:06:11 -0800 (PST) (envelope-from kris) Date: Sat, 25 Nov 2000 23:06:11 -0800 From: Kris Kennaway To: audit@FreeBSD.org Cc: obrien@FreeBSD.org Subject: gcc format string warning patch Message-ID: <20001125230611.A16472@citusc17.usc.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="3V7upXqbjpZ4EhLz" Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --3V7upXqbjpZ4EhLz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I ported the NetBSD -Wnetbsd-format-audit warning option to gcc which checks for non-constant format strings for auditing purposes. It seems to work, although of course it gives lots of false positives. Patches at http://www.freebsd.org/~kris/gcc-format-warning.patch I'm going to try and generate a master list of these warnings from a 'make world' so they can be examined. NetBSD have done a lot of cleanups here (though I'd expect most are not security-relevant). They also have a library function they have just committed which checks for compatability of format strings, which I'm going to look at porting as well. Feedback welcomed. Kris --3V7upXqbjpZ4EhLz Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjogtmMACgkQWry0BWjoQKVHXwCg2zV3SD/NYic82Eg8HRnHDM2k ADAAoKFfMZOfd1dv3zAvP4clrxuZIy7h =wsbH -----END PGP SIGNATURE----- --3V7upXqbjpZ4EhLz-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message