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

[Minios-devel] [UNIKRAFT PATCH v2 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: Wed, 20 Nov 2019 14:02:32 +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=QzvyZxmKuY+n7zZlzrebAlKHtTfwQ1LPJOFVSEAni5M=; b=MSnL5Ca5nm33uZ3ZttxqOprrC5zQKY+s5I3DI1J2bIqL5FfaWqB34N1XInqzJxZ/fQT1D+nnqn49d4GrgrJvKtPPbcMlAQheZaaMWbOqFcnqv8qNO0vikd5oHeVemv2rvVuLKqv6jExMKQ9wGUii314UWvq6BHWNimo0GFp9DAj8BGftEq6XGQtnnyijgOlrZVpagv4LzD5gk2+rinciaKk+q3wwesDi5C7m87uEREZ40oFH9B12xlfZ0m+IUWKldsxhcfEMqfJMf3qBOBBUMlGkhs2JQv08jnOrdABkojK4Tvhffz5Qzfw8eWSVV/2nf+gAZFws8Dc4PgSTPjCMZw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eGNnjhqqBxIANxL86z4uGKg7CMSQQC4qjvYjaftPm2ZwPPzNllFf6ass0z2xXeqr7D2WDQ5Ob5HlpioPBdhVqWkwRjKuxkbCe2Nood4o0ydxjDr2By28e03CwpKhBlEF+5nh/MLMhTjxKeoPLTUgFHUE+/6+T277m6F0BqwaeEsKDN08G3nT2vnKxEm3ClI6zO/U0wgaWRqaUhlhz6Kk8wU5k0oWKkruOR2GjjT1kVJz8ckJHpI8vopb/E5oLo+r4PgLR8FGCTRrfkWNFH1tNITNH8R1Hc6lrS2mkhGEn+Ok2Wy3YZcjxFzAopdAihYo8hOdQgylOOKZ4TR+2GP8Hg==
  • 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>, "sharan.santhanam@xxxxxxxxx" <sharan.santhanam@xxxxxxxxx>
  • Delivery-date: Wed, 20 Nov 2019 14:02:51 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Thread-index: AQHVn6snySa9vz2onEODYHd4FU3pog==
  • Thread-topic: [UNIKRAFT PATCH v2 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 3f5046ca..065ced13 100644
--- a/lib/ukboot/boot.c
+++ b/lib/ukboot/boot.c
@@ -61,6 +61,9 @@
 #ifdef CONFIG_LIBUKLIBPARAM
 #include <uk/libparam.h>
 #endif /* CONFIG_LIBUKLIBPARAM */
+#if CONFIG_LIBUKSECURITY_SSP
+#include <uksecurity/stackprotector.h>
+#endif
 
 int main(int argc, char *argv[]) __weak;
 
@@ -190,6 +193,10 @@ void ukplat_entry(int argc, char *argv[])
                uk_ctortab[i]();
        }
 
+#if CONFIG_LIBUKSECURITY_SSP
+       boot_init_stack_canary();
+#endif
+
 #ifdef CONFIG_LIBUKLIBPARAM
        rc = (argc > 1) ? uk_libparam_parse(argv[0], argc - 1, &argv[1]) : 0;
        if (unlikely(rc < 0))
-- 
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®.