[no subject]

From: Unknown
Date: Sat Jul 11 2015 - 22:15:04 EST


From: Mustapha Abiola <hi@xxxxxxxxxxxx>

Date: Sat, 11 Jul 2015 17:01:04 +0000

Subject: [PATCH 1/1] Fix redundant check against unsigned int in broken audit
test fix for exec arg len


Quick patch to fix the needless check of `len` being < 0 as its an

unsigned int.


Signed-off-by: Mustapha Abiola <hi@xxxxxxxxxxxx>

---

kernel/auditsc.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/kernel/auditsc.c b/kernel/auditsc.c

index e85bdfd..0012476 100644

--- a/kernel/auditsc.c

+++ b/kernel/auditsc.c

@@ -1021,7 +1021,7 @@ static int audit_log_single_execve_arg(struct
audit_context *context,

* for strings that are too long, we should not have created

* any.

*/

- if (WARN_ON_ONCE(len < 0 || len > MAX_ARG_STRLEN - 1)) {

+ if (WARN_ON_ONCE(len > MAX_ARG_STRLEN - 1)) {

send_sig(SIGKILL, current, 0);

return -1;

}

--

1.9.1

--001a113eacde5378de051aa41e23
Content-Type: application/octet-stream;
name="0001-Fix-redundant-check-against-unsigned-int-in-broken-a.patch"
Content-Disposition: attachment;
filename="0001-Fix-redundant-check-against-unsigned-int-in-broken-a.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_ibzugrro1

RnJvbSA1NWZhZTA5OWQ0Njc0OWI3Mzg5NTkzNGFhYjhjMjgyM2M1YTIzYWJlIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBNdXN0YXBoYSBBYmlvbGEgPGhpQG11c3RhcGhhLm9yZz4KRGF0
ZTogU2F0LCAxMSBKdWwgMjAxNSAxNzowMTowNCArMDAwMApTdWJqZWN0OiBbUEFUQ0ggMS8xXSBG
aXggcmVkdW5kYW50IGNoZWNrIGFnYWluc3QgdW5zaWduZWQgaW50IGluIGJyb2tlbiBhdWRpdAog
dGVzdCBmaXggZm9yIGV4ZWMgYXJnIGxlbgoKUXVpY2sgcGF0Y2ggdG8gZml4IHRoZSBuZWVkbGVz
cyBjaGVjayBvZiBgbGVuYCBiZWluZyA8IDAgYXMgaXRzIGFuCnVuc2lnbmVkIGludC4KClNpZ25l
ZC1vZmYtYnk6IE11c3RhcGhhIEFiaW9sYSA8aGlAbXVzdGFwaGEub3JnPgotLS0KIGtlcm5lbC9h
dWRpdHNjLmMgfCAyICstCiAxIGZpbGUgY2hhbmdlZCwgMSBpbnNlcnRpb24oKyksIDEgZGVsZXRp
b24oLSkKCmRpZmYgLS1naXQgYS9rZXJuZWwvYXVkaXRzYy5jIGIva2VybmVsL2F1ZGl0c2MuYwpp
bmRleCBlODViZGZkLi4wMDEyNDc2IDEwMDY0NAotLS0gYS9rZXJuZWwvYXVkaXRzYy5jCisrKyBi
L2tlcm5lbC9hdWRpdHNjLmMKQEAgLTEwMjEsNyArMTAyMSw3IEBAIHN0YXRpYyBpbnQgYXVkaXRf
bG9nX3NpbmdsZV9leGVjdmVfYXJnKHN0cnVjdCBhdWRpdF9jb250ZXh0ICpjb250ZXh0LAogCSAq
IGZvciBzdHJpbmdzIHRoYXQgYXJlIHRvbyBsb25nLCB3ZSBzaG91bGQgbm90IGhhdmUgY3JlYXRl
ZAogCSAqIGFueS4KIAkgKi8KLQlpZiAoV0FSTl9PTl9PTkNFKGxlbiA8IDAgfHwgbGVuID4gTUFY
X0FSR19TVFJMRU4gLSAxKSkgeworCWlmIChXQVJOX09OX09OQ0UobGVuID4gTUFYX0FSR19TVFJM
RU4gLSAxKSkgewogCQlzZW5kX3NpZyhTSUdLSUxMLCBjdXJyZW50LCAwKTsKIAkJcmV0dXJuIC0x
OwogCX0KLS0gCjEuOS4xCgoK
--001a113eacde5378de051aa41e23--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/