Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751972Ab2KFPVM (ORCPT ); Tue, 6 Nov 2012 10:21:12 -0500 Received: from mx3-phx2.redhat.com ([209.132.183.24]:49806 "EHLO mx3-phx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750716Ab2KFPVK (ORCPT ); Tue, 6 Nov 2012 10:21:10 -0500 Date: Tue, 6 Nov 2012 10:21:01 -0500 (EST) From: Tomas Hozza To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, apw@canonical.com, jasowang@redhat.com Cc: Olaf Hering , KY Srinivasan Message-ID: <165383498.7447465.1352215261695.JavaMail.root@redhat.com> In-Reply-To: <456703059.7446523.1352215033661.JavaMail.root@redhat.com> Subject: [PATCH] tools/hv/hv_kvp_daemon.c: Netlink source address validation allows DoS MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_7447463_91626241.1352215261693" X-Originating-IP: [10.34.4.165] X-Mailer: Zimbra 7.2.0_GA_2669 (ZimbraWebClient - FF3.0 (Linux)/7.2.0_GA_2669) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2993 Lines: 61 ------=_Part_7447463_91626241.1352215261693 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Hi. After discussion with KY Srinivasan and Olaf Hering I'm sending you a patch for the HyperV KVP daemon distributed in linux kernel "tools/hv/hv_kvp_daemon.c". There is an issue in the current daemon source causing hyperv kvp daemon to exit when it processes a spoofed Netlink packet which has been sent from an untrusted local user. This patch is fixing this, so now the Netlink messages with a non-zero nl_pid source address are just ignored. Regards, Tomas Hozza Associate Software Engineer BaseOS - Brno, CZ ------=_Part_7447463_91626241.1352215261693 Content-Type: text/x-patch; name=0001-Netlink-source-address-validation-allows-DoS.patch Content-Disposition: attachment; filename=0001-Netlink-source-address-validation-allows-DoS.patch Content-Transfer-Encoding: base64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mZXIpLCAwLAog CQkJCWFkZHJfcCwgJmFkZHJfbCk7CiAKLQkJaWYgKGxlbiA8IDAgfHwgYWRkci5ubF9waWQpIHsK KwkJaWYgKGxlbiA8IDApIHsKIAkJCXN5c2xvZyhMT0dfRVJSLCAicmVjdmZyb20gZmFpbGVkOyBw aWQ6JXUgZXJyb3I6JWQgJXMiLAogCQkJCQlhZGRyLm5sX3BpZCwgZXJybm8sIHN0cmVycm9yKGVy cm5vKSk7CiAJCQljbG9zZShmZCk7CiAJCQlyZXR1cm4gLTE7CiAJCX0KIAorCQlpZiAoYWRkci5u bF9waWQpIHsKKwkJCXN5c2xvZyhMT0dfV0FSTklORywgIlJlY2VpdmVkIHBhY2tldCBmcm9tIHVu dHJ1c3RlZCBwaWQ6JXUiLAorCQkJCQlhZGRyLm5sX3BpZCk7CisJCQljb250aW51ZTsKKwkJfQor CiAJCWluY29taW5nX21zZyA9IChzdHJ1Y3Qgbmxtc2doZHIgKilrdnBfcmVjdl9idWZmZXI7CiAJ CWluY29taW5nX2NuX21zZyA9IChzdHJ1Y3QgY25fbXNnICopTkxNU0dfREFUQShpbmNvbWluZ19t c2cpOwogCQlodl9tc2cgPSAoc3RydWN0IGh2X2t2cF9tc2cgKilpbmNvbWluZ19jbl9tc2ctPmRh dGE7Ci0tIAoxLjcuMTEuNwoK ------=_Part_7447463_91626241.1352215261693-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/