[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT PATCH 3/3] lib/ukboot: Initialize the canary value at boot


  • To: "minios-devel@xxxxxxxxxxxxx" <minios-devel@xxxxxxxxxxxxx>
  • From: Vlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
  • Date: Tue, 13 Aug 2019 09:54:45 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=stud.acs.upb.ro; dmarc=pass action=none header.from=stud.acs.upb.ro; dkim=pass header.d=stud.acs.upb.ro; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JgIHFAOYa/elOSPfhLQDSqZzeaHHB0zAEGzpqojOxZw=; b=k8uuWrSJXlqMyHSE46Fk/yoyJP3mfEp+HuyPhx0pzU4EcJXBxad20c/hijYR501ZjO/GXdVdZYiQ6tUlN8fPWucnI5cIvTLDDRmAHzCSY/ctlgtcbgRZDVuDr2s0WiHoa83yCFtemu16VGDkpwwUtY7hg+R6nu1JNLMNV/PqqcnWXyoYaeumWVbtc4C6LaUZbTDxPIsZFcyumo5+Z99MuMoWHNq/c78ZfjoGOSluAEDI8C76TVsVOIcjq8SohLuC0dSiuQH8Is0t0otBFI4tt4liaUMBLqfs5KB1Qz8PSxB7VIpEJdYdPnfteedCQGm/m6VrTRWJmGFEjOpeFESOwQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z6H1BB0v62ZRX51wpxihAjdcKY1Dz7FxngTnIuUx6eafiMhrqc6djqm6ohhWRd+IzmKBZBpsTpWRaCZuH++ILUeckG2Jmtfozr6NS0eB74smr0XVlCYIRPMJYkDnxIUr+nl3/mU/N7LP8l9ACbPfcqnuSrdMKijKhDs4Ej01y1043cUdX7CqG0n1jj9Nq2qClBRuO7Pu88qf5Z1xh38g5MxMZZD0DHhzHx78KNkoPImjJqpsOCnqG2DdeGuk7NEegOX/MGCulrTG79FE2xNMAg1ZUMcqqgHbKmdEi+j0TtsbxKcKPLJaAeiX21kLGTPcn08E4yY2yj0mH66FHlnKPg==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=vlad_andrei.badoiu@xxxxxxxxxxxxxxx;
  • Cc: "felipe.huici@xxxxxxxxx" <felipe.huici@xxxxxxxxx>, "simon.kuenzer@xxxxxxxxx" <simon.kuenzer@xxxxxxxxx>, Vlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>, "costin.lupu@xxxxxxxxx" <costin.lupu@xxxxxxxxx>
  • Delivery-date: Tue, 13 Aug 2019 09:54:56 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Thread-index: AQHVUb0i306KOfXtlE69QrCkRIY0dA==
  • Thread-topic: [UNIKRAFT PATCH 3/3] lib/ukboot: Initialize the canary value at boot

We initialize the canary value at boot with a random variable.

Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
---
 lib/ukboot/boot.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/ukboot/boot.c b/lib/ukboot/boot.c
index 97c7d18..b8b44f3 100644
--- a/lib/ukboot/boot.c
+++ b/lib/ukboot/boot.c
@@ -61,6 +61,9 @@
 #if CONFIG_LIBUKBUS
 #include <uk/bus.h>
 #endif /* CONFIG_LIBUKBUS */
+#if CONFIG_LIBUKSECURITY_SSP
+#include <uksecurity/stackprotector.h>
+#endif
 
 int main(int argc, char *argv[]) __weak;
 #ifdef CONFIG_LIBLWIP
@@ -183,6 +186,10 @@ void ukplat_entry(int argc, char *argv[])
                (*cfn)();
        }
 
+#if CONFIG_LIBUKSECURITY_SSP
+       boot_init_stack_canary();
+#endif
+
 #if CONFIG_LIBUKALLOC && CONFIG_LIBUKALLOCBBUDDY && CONFIG_LIBUKBOOT_INITALLOC
        /* initialize memory allocator
         * FIXME: ukallocbbuddy is hard-coded for now
-- 
2.20.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.