From patchwork Mon Aug 6 21:19:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jann Horn via Selinux X-Patchwork-Id: 10558643 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 63D8613AC for ; Tue, 7 Aug 2018 12:16:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4EABD286A0 for ; Tue, 7 Aug 2018 12:16:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4156C29BCC; Tue, 7 Aug 2018 12:16:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from USFB19PA14.eemsg.mail.mil (uphb19pa11.eemsg.mail.mil [214.24.26.85]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BCC00286A0 for ; Tue, 7 Aug 2018 12:16:00 +0000 (UTC) Received: from emsm-gh1-uea11.ncsc.mil ([214.29.60.3]) by USFB19PA14.eemsg.mail.mil with ESMTP/TLS/AES256-SHA; 07 Aug 2018 12:15:56 +0000 X-IronPort-AV: E=Sophos;i="5.51,455,1526342400"; d="scan'208";a="16696279" IronPort-PHdr: 9a23:6+al+BDqgj91Z09zcOcxUyQJP3N1i/DPJgcQr6AfoPdwSPn+osiwAkXT6L1XgUPTWs2DsrQY07SQ6/iocFdDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8DEdBAj0OxZrKe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.ncsc.mil) ([144.51.242.1]) by emsm-gh1-uea11.NCSC.MIL with ESMTP; 07 Aug 2018 12:15:51 +0000 Received: from prometheus.infosec.tycho.ncsc.mil (prometheus.infosec.tycho.ncsc.mil [192.168.25.40]) by tarius.infosec.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id w77CEshP001495; Tue, 7 Aug 2018 08:15:11 -0400 Received: from tarius.infosec.tycho.ncsc.mil (tarius.infosec.tycho.ncsc.mil [144.51.242.1]) by prometheus.infosec.tycho.ncsc.mil (8.15.2/8.15.2) with ESMTP id w76LKPl4001740 for ; Mon, 6 Aug 2018 17:20:25 -0400 Received: from goalie.tycho.ncsc.mil (goalie.infosec.tycho.ncsc.mil [144.51.242.250]) by tarius.infosec.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id w76LKO4p000814 for ; Mon, 6 Aug 2018 17:20:24 -0400 IronPort-PHdr: 9a23:L7rE2xZCnKH1etwNaUQ2Rin/LSx94ef9IxIV55w7irlHbqWk+dH4MVfC4el21gCTD7jwzNYfoNL/6vqmVGEF+pnHtXkDdNpJVhtWwd4OkVkGB8iIQVb+MOasdzYzScZLUlll1368NkdRFYD1YFiB6maq42sqEw7kfRFwOvyzH4fTi8qt0OXnoJTJfwJ3mweeS+lPCTmPlCbzjPM0pqskBJwJ9DvuhkJ4cttc60BSY2uts1De3PaY8ppu42EVufsn8c4GW6Lnea81VvpXCzMpN21z78ru5lHYVQXawHwaXy0NlwZQRQjI6BavRpDqri7zrfZwwgGfNMzyCLEoAXGssPstRxjvhyMKcTU+9TKfhs9xifdDqQm671xkwoHSaZ2ILvc2YK7HfN0bSGYAFsZcXiBMGMW9OqMACO0OOesepI74qg== X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A1C2AACeO2hbly0YGNZbHAEBAQQBAQoBAYMkJ4FlFhKDfogJjESDBJAthEOBJANehGgCgyohNBgBAgEBAQEBAQIUAQEBAQEGGAZMhW0EGQEBNwEoDAImAjYBBQEiARKDICmBVwOgETyKG297M4J1AQEFgWSFZQgSeYd+F4FBP4ESgl2DUAKEYoJVh36SNwmEbopMC4FNjFMrh3SKMA8hgSBrgR8zGggbFYMkghkMFxGDNIpRA22QFQEB X-IPAS-Result: A1C2AACeO2hbly0YGNZbHAEBAQQBAQoBAYMkJ4FlFhKDfogJjESDBJAthEOBJANehGgCgyohNBgBAgEBAQEBAQIUAQEBAQEGGAZMhW0EGQEBNwEoDAImAjYBBQEiARKDICmBVwOgETyKG297M4J1AQEFgWSFZQgSeYd+F4FBP4ESgl2DUAKEYoJVh36SNwmEbopMC4FNjFMrh3SKMA8hgSBrgR8zGggbFYMkghkMFxGDNIpRA22QFQEB X-IronPort-AV: E=Sophos;i="5.51,452,1526356800"; d="scan'208";a="340412" Received: from emsm-gh1-uea10.ncsc.mil ([214.29.60.34]) by goalie.tycho.ncsc.mil with ESMTP; 06 Aug 2018 17:20:23 -0400 IronPort-PHdr: 9a23:xM+QhhXMX6RQpSM8zLJLmXJ+hE/V8LGtZVwlr6E/grcLSJyIuqrYbRyHt8tkgFKBZ4jH8fUM07OQ7/i+HzRYqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRoLerpBIHSk9631+ev8JHPfglEnjWwba9zIRmssQndqtQdjJd/JKo21hbHuGZDdf5MxWNvK1KTnhL86dm18ZV+7SleuO8v+tBZX6nicKs2UbJXDDI9M2Ao/8LrrgXMTRGO5nQHTGoblAdDDhXf4xH7WpfxtTb6tvZ41SKHM8D6Uaw4VDK/5KpwVhTmlDkIOCI48GHPi8x/kqRboA66pxdix4LYeZyZOOZicq/Ye94RWGhPUdtLVyFZH42yYYgBAOUGM+hYsYfyu0ADrQeiCQS2GO/i0CNEi33w0KYn0+ohCwbG3Ak4EtwKqnvUqtP1P7oQX+Cy1qnIyyjIYvRU2Tjn7ojIdBAhrOqDXbJ3dsrRxk0vGB3fglqMrozlOiqY2+IQuGaY9+ptTf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mzA15X6NHl8Vit3Y21ExyJKafhUtGbC+d1IvsN6f/L2Dz+FWud/aT1A6CltmR/agL5bIzrFCw9A2qF09363x8yJEVyHqT4JzWERAfGYz8SEc59hV25vnabyAx6pmS1ChEPq6zvTvPndkuAeY= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BVAQBIu2hbly0YGNZdHAEBAQQBAQoBAYMkJ4FlFhKDfpRRgwSQLYRDgSQDXoRoAoMrITUXAQIBAQEBAQECARMBAQEBAQYYBkwMgjUkAYMHBBkBATcBKAwCJgI2AQUBIgESgyApgVcDoUE8ihtvezOCdQEBBYFkhWkIEnmHfheBQT+BEoJdg1AChGKCVYd+kjcJhG6KTAuBTYxTK4d0ijAPIYEiAmeBHzMaCBsVgySCGQwXEYM0ilEDbZAJAQE X-IPAS-Result: A0BVAQBIu2hbly0YGNZdHAEBAQQBAQoBAYMkJ4FlFhKDfpRRgwSQLYRDgSQDXoRoAoMrITUXAQIBAQEBAQECARMBAQEBAQYYBkwMgjUkAYMHBBkBATcBKAwCJgI2AQUBIgESgyApgVcDoUE8ihtvezOCdQEBBYFkhWkIEnmHfheBQT+BEoJdg1AChGKCVYd+kjcJhG6KTAuBTYxTK4d0ijAPIYEiAmeBHzMaCBsVgySCGQwXEYM0ilEDbZAJAQE X-IronPort-AV: E=Sophos;i="5.51,452,1526342400"; d="scan'208";a="14561223" X-IronPort-Outbreak-Status: No, level 0, Unknown - Unknown Received: from ucol3cpa07.eemsg.mail.mil ([214.24.24.45]) by EMSM-GH1-UEA10.NCSC.MIL with ESMTP; 06 Aug 2018 21:20:16 +0000 X-EEMSG-check-005: 0 X-EEMSG-check-006: 000-001;0ff37525-32f2-4df3-aa5c-098bb9c491ce X-EEMSG-check-008: 42604790|UCOL3CPA12_EEMSG_MP27.csd.disa.mil X-EEMSG-SBRS: 3.5 X-EEMSG-ORIG-IP: 209.85.214.74 X-EEMSG-check-002: true IronPort-PHdr: 9a23:SX9eQRJqIaiFIlVWVd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KIDEXI3l1KSIwSOTBpRLYiVDDVeWHDHjcIDSH78hciOZavdoiD0fHeysU4Y71AqGrAbgyqF/KuPf92sfr521kJBu6unSkwwi3SBlBMSalWeWRid7mX1MDz0/2qZ/iUN6zViH3O5zhPkLO8ZU4qZrWwE8fb7b1eoyX9L7XATBVtiOT1miT5OtBjRnHYF5+MMHf0soQ4bqtRvExSf/RuZNz+XaVqxxybrV2j3KH+g4zn/H0Kc7iFx9GJlBMWC2w+t9/g7VB8jDlFifnKuxM6sb2yHJ+SGIym/c5RgEAj41ar3MWDUkXmWTtc7wvxmQQLipBrAqdABGzJzac/YYWpjSlVxDAczbFpHebma2wTriAB+JwvaNcNKvdTpBmiraD0cAnkYY+nPUbQU= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DqAQCfumhbh0rWVdFdHQEBBQELAYMkggwWEoN+lFGDBJAthEOBJANeE4RVAoMrGQcBBDEXAQIBAQEBAQEBAQETAQEBCgsJCCkjDII1JAGDBwQZAQE3ASgMAiYCNgEFASIBEoMgKYFXoUk8ihtvezOCdQEBBYFkhWkIEnmHfheBQT+BEoJdg1AChGKCVYd+kjcJhG6KTAuBTYxSASuHdIowDyGBIgJngR8zGggbFYMkghkMF4NFilEDPTCQCQEB X-IPAS-Result: A0DqAQCfumhbh0rWVdFdHQEBBQELAYMkggwWEoN+lFGDBJAthEOBJANeE4RVAoMrGQcBBDEXAQIBAQEBAQEBAQETAQEBCgsJCCkjDII1JAGDBwQZAQE3ASgMAiYCNgEFASIBEoMgKYFXoUk8ihtvezOCdQEBBYFkhWkIEnmHfheBQT+BEoJdg1AChGKCVYd+kjcJhG6KTAuBTYxSASuHdIowDyGBIgJngR8zGggbFYMkghkMF4NFilEDPTCQCQEB Received: from mail-it0-f74.google.com ([209.85.214.74]) by UCOL3CPA12.eemsg.mail.mil with ESMTP/TLS/AES128-SHA; 06 Aug 2018 21:19:38 +0000 Received: by mail-it0-f74.google.com with SMTP id l185-v6so13752199ite.2 for ; Mon, 06 Aug 2018 14:19:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=z1YkuEhJSa76Eh6u3qIGx1kWICWudnLuyFUEwJXWRR8=; b=fz1LTiyIlgw7aykSR312FMjilQGYU+s9T39KDStlDlzCap21H86LAMncCaVV1pU0sM HLddYcjdTz4gg0AU6y5hd0Fnqpjmti7izwLD66CDbExHLs2oTkWHk0rI6924lOPNHqSc gWg7I6YagwkSF7qpJe3fSIdu279iCJPfE1xhzQYEMjjAb5aWu6v480RCVS6XqBNNG7X4 3ywSuZ1CMThuVhk77uFr5n3C5oBhoJLtW/mauPGYqgwaNSbq+oxcFwqqaaZDd9mG+Ykr 1NVP11giF5n75POY/fcpW+9MMpZRUTZ+/2Kj9i8n8nGB6J05Ks+CQXJOkTLeOqgMdcb0 bJsg== X-Gm-Message-State: AOUpUlEeqbvvkjVA1JMoet/b+mutLyl7ToUHfl2Q6/MHcwycjAoEvf6b Wtnw42SLEq54XICC+FfFFw+crLExyA== X-Google-Smtp-Source: AA+uWPw3+e8RGAdyw6tf8Pah9CMPbjOwRpDCivdq588qJ4+zclQU0zS0rI2HkgtYsMRzwueN2QDwtoJ8eg== X-Received: by 2002:a6b:b251:: with SMTP id b78-v6mr8303163iof.128.1533590378252; Mon, 06 Aug 2018 14:19:38 -0700 (PDT) Date: Mon, 6 Aug 2018 23:19:32 +0200 Message-Id: <20180806211932.198488-1-jannh@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.18.0.597.ga71716f1ad-goog X-EEMSG-check-009: 444-444 To: Stephen Smalley , Paul Moore , Eric Paris , selinux@tycho.nsa.gov, jannh@google.com X-Mailman-Approved-At: Tue, 07 Aug 2018 08:14:52 -0400 Subject: [PATCH] selinux: refactor mls_context_to_sid() and make it stricter X-BeenThere: selinux@tycho.nsa.gov X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: From: Jann Horn via Selinux Reply-To: Jann Horn Cc: linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org Errors-To: selinux-bounces@tycho.nsa.gov Sender: "Selinux" X-Virus-Scanned: ClamAV using ClamSMTP The intended behavior change for this patch is to reject any MLS strings that contain (trailing) garbage if p->mls_enabled is true. As suggested by Paul Moore, change mls_context_to_sid() so that the two parts of the range are extracted before the rest of the parsing. Because now we don't have to scan for two different separators simultaneously everywhere, we can actually switch to strchr() everywhere instead of the open-coded loops that scan for two separators at once. mls_context_to_sid() used to signal how much of the input string was parsed by updating `*scontext`. However, there is actually no case in which mls_context_to_sid() only parses a subset of the input and still returns a success (other than the buggy case with a second '-' in which it incorrectly claims to have consumed the entire string). Turn `scontext` into a simple pointer argument and stop redundantly checking whether the entire input was consumed in string_to_context_struct(). This also lets us remove the `scontext_len` argument from `string_to_context_struct()`. Signed-off-by: Jann Horn --- Refactored version of "[PATCH] selinux: stricter parsing in mls_context_to_sid()" based on Paul's comments. WDYT? I've thrown some inputs at it, and it seems to work. security/selinux/ss/mls.c | 178 ++++++++++++++------------------- security/selinux/ss/mls.h | 2 +- security/selinux/ss/services.c | 12 +-- 3 files changed, 82 insertions(+), 110 deletions(-) diff --git a/security/selinux/ss/mls.c b/security/selinux/ss/mls.c index 39475fb455bc..2fe459df3c85 100644 --- a/security/selinux/ss/mls.c +++ b/security/selinux/ss/mls.c @@ -218,9 +218,7 @@ int mls_context_isvalid(struct policydb *p, struct context *c) /* * Set the MLS fields in the security context structure * `context' based on the string representation in - * the string `*scontext'. Update `*scontext' to - * point to the end of the string representation of - * the MLS fields. + * the string `scontext'. * * This function modifies the string in place, inserting * NULL characters to terminate the MLS fields. @@ -235,22 +233,21 @@ int mls_context_isvalid(struct policydb *p, struct context *c) */ int mls_context_to_sid(struct policydb *pol, char oldc, - char **scontext, + char *scontext, struct context *context, struct sidtab *s, u32 def_sid) { - - char delim; - char *scontextp, *p, *rngptr; + char *sensitivity, *cur_cat, *next_cat, *rngptr; struct level_datum *levdatum; struct cat_datum *catdatum, *rngdatum; - int l, rc = -EINVAL; + int l, rc, i; + char *rangep[2]; if (!pol->mls_enabled) { - if (def_sid != SECSID_NULL && oldc) - *scontext += strlen(*scontext) + 1; - return 0; + if ((def_sid != SECSID_NULL && oldc) || (*scontext) == '\0') + return 0; + return -EINVAL; } /* @@ -261,113 +258,94 @@ int mls_context_to_sid(struct policydb *pol, struct context *defcon; if (def_sid == SECSID_NULL) - goto out; + return -EINVAL; defcon = sidtab_search(s, def_sid); if (!defcon) - goto out; + return -EINVAL; - rc = mls_context_cpy(context, defcon); - goto out; + return mls_context_cpy(context, defcon); } - /* Extract low sensitivity. */ - scontextp = p = *scontext; - while (*p && *p != ':' && *p != '-') - p++; - - delim = *p; - if (delim != '\0') - *p++ = '\0'; + /* + * If we're dealing with a range, figure out where the two parts + * of the range begin. + */ + rangep[0] = scontext; + rangep[1] = strchr(scontext, '-'); + if (rangep[1]) { + rangep[1][0] = '\0'; + rangep[1]++; + } + /* For each part of the range: */ for (l = 0; l < 2; l++) { - levdatum = hashtab_search(pol->p_levels.table, scontextp); - if (!levdatum) { - rc = -EINVAL; - goto out; - } + /* Split sensitivity and category set. */ + sensitivity = rangep[l]; + if (sensitivity == NULL) + break; + next_cat = strchr(sensitivity, ':'); + if (next_cat) + *(next_cat++) = '\0'; + /* Parse sensitivity. */ + levdatum = hashtab_search(pol->p_levels.table, sensitivity); + if (!levdatum) + return -EINVAL; context->range.level[l].sens = levdatum->level->sens; - if (delim == ':') { - /* Extract category set. */ - while (1) { - scontextp = p; - while (*p && *p != ',' && *p != '-') - p++; - delim = *p; - if (delim != '\0') - *p++ = '\0'; - - /* Separate into range if exists */ - rngptr = strchr(scontextp, '.'); - if (rngptr != NULL) { - /* Remove '.' */ - *rngptr++ = '\0'; - } + /* Extract category set. */ + while (next_cat != NULL) { + cur_cat = next_cat; + next_cat = strchr(next_cat, ','); + if (next_cat != NULL) + *(next_cat++) = '\0'; + + /* Separate into range if exists */ + rngptr = strchr(cur_cat, '.'); + if (rngptr != NULL) { + /* Remove '.' */ + *rngptr++ = '\0'; + } - catdatum = hashtab_search(pol->p_cats.table, - scontextp); - if (!catdatum) { - rc = -EINVAL; - goto out; - } + catdatum = hashtab_search(pol->p_cats.table, cur_cat); + if (!catdatum) + return -EINVAL; - rc = ebitmap_set_bit(&context->range.level[l].cat, - catdatum->value - 1, 1); - if (rc) - goto out; - - /* If range, set all categories in range */ - if (rngptr) { - int i; - - rngdatum = hashtab_search(pol->p_cats.table, rngptr); - if (!rngdatum) { - rc = -EINVAL; - goto out; - } - - if (catdatum->value >= rngdatum->value) { - rc = -EINVAL; - goto out; - } - - for (i = catdatum->value; i < rngdatum->value; i++) { - rc = ebitmap_set_bit(&context->range.level[l].cat, i, 1); - if (rc) - goto out; - } - } + rc = ebitmap_set_bit(&context->range.level[l].cat, + catdatum->value - 1, 1); + if (rc) + return rc; + + /* If range, set all categories in range */ + if (rngptr == NULL) + continue; + + rngdatum = hashtab_search(pol->p_cats.table, rngptr); + if (!rngdatum) + return -EINVAL; + + if (catdatum->value >= rngdatum->value) + return -EINVAL; - if (delim != ',') - break; + for (i = catdatum->value; i < rngdatum->value; i++) { + rc = ebitmap_set_bit(&context->range.level[l].cat, i, 1); + if (rc) + return rc; } } - if (delim == '-') { - /* Extract high sensitivity. */ - scontextp = p; - while (*p && *p != ':') - p++; - - delim = *p; - if (delim != '\0') - *p++ = '\0'; - } else - break; } - if (l == 0) { + /* If we didn't see a '-', the range start is also the range end. */ + if (rangep[1] == NULL) { context->range.level[1].sens = context->range.level[0].sens; rc = ebitmap_cpy(&context->range.level[1].cat, &context->range.level[0].cat); if (rc) - goto out; + return rc; } - *scontext = ++p; - rc = 0; -out: - return rc; + + return 0; } /* @@ -379,21 +357,19 @@ int mls_context_to_sid(struct policydb *pol, int mls_from_string(struct policydb *p, char *str, struct context *context, gfp_t gfp_mask) { - char *tmpstr, *freestr; + char *tmpstr; int rc; if (!p->mls_enabled) return -EINVAL; - /* we need freestr because mls_context_to_sid will change - the value of tmpstr */ - tmpstr = freestr = kstrdup(str, gfp_mask); + tmpstr = kstrdup(str, gfp_mask); if (!tmpstr) { rc = -ENOMEM; } else { - rc = mls_context_to_sid(p, ':', &tmpstr, context, + rc = mls_context_to_sid(p, ':', tmpstr, context, NULL, SECSID_NULL); - kfree(freestr); + kfree(tmpstr); } return rc; diff --git a/security/selinux/ss/mls.h b/security/selinux/ss/mls.h index 9a3ff7af70ad..67093647576d 100644 --- a/security/selinux/ss/mls.h +++ b/security/selinux/ss/mls.h @@ -34,7 +34,7 @@ int mls_level_isvalid(struct policydb *p, struct mls_level *l); int mls_context_to_sid(struct policydb *p, char oldc, - char **scontext, + char *scontext, struct context *context, struct sidtab *s, u32 def_sid); diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index dd2ceec06fef..9212d4dd817a 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c @@ -1367,7 +1367,6 @@ int security_sid_to_context_force(struct selinux_state *state, u32 sid, static int string_to_context_struct(struct policydb *pol, struct sidtab *sidtabp, char *scontext, - u32 scontext_len, struct context *ctx, u32 def_sid) { @@ -1428,15 +1427,12 @@ static int string_to_context_struct(struct policydb *pol, ctx->type = typdatum->value; - rc = mls_context_to_sid(pol, oldc, &p, ctx, sidtabp, def_sid); + rc = mls_context_to_sid(pol, oldc, p, ctx, sidtabp, def_sid); if (rc) goto out; - rc = -EINVAL; - if ((p - scontext) < scontext_len) - goto out; - /* Check the validity of the new context. */ + rc = -EINVAL; if (!policydb_context_isvalid(pol, ctx)) goto out; rc = 0; @@ -1491,7 +1487,7 @@ static int security_context_to_sid_core(struct selinux_state *state, policydb = &state->ss->policydb; sidtab = &state->ss->sidtab; rc = string_to_context_struct(policydb, sidtab, scontext2, - scontext_len, &context, def_sid); + &context, def_sid); if (rc == -EINVAL && force) { context.str = str; context.len = strlen(str) + 1; @@ -1959,7 +1955,7 @@ static int convert_context(u32 key, goto out; rc = string_to_context_struct(args->newp, NULL, s, - c->len, &ctx, SECSID_NULL); + &ctx, SECSID_NULL); kfree(s); if (!rc) { printk(KERN_INFO "SELinux: Context %s became valid (mapped).\n",