mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Catalin(ux aka Dino) BOIE" <util@deuroconsult.ro>
To: netdev@oss.sgi.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Trivial fix for out of bounds array access in xfrm4_policy_check
Date: Tue, 7 Sep 2004 13:35:52 +0300 (EEST)	[thread overview]
Message-ID: <Pine.LNX.4.61.0409071322100.8637@hosting.rdsbv.ro> (raw)

[-- Attachment #1: Type: TEXT/PLAIN, Size: 620 bytes --]

Hello!

Coverity found a bug in accessing xfrm4_policy_check using XFRM_POLICY_FWD 
(=2) as index in sk->sk_policy.

sk->sk_policy[] is defined in sock.h as:

struct xfrm_policy *sk_policy[2];

Attached is the fix.

http://linuxbugs.coverity.com/external/editbugparent.php?viewbugid=2138&checkers%5B%5D=all&status%5B%5D=BUG&status%5B%5D=UNINSPECTED&status%5B%5D=UNKNOWN&status%5B%5D=DON%27T%20CARE&status%5B%5D=PENDING&product%5B%5D=all&component%5B%5D=all&file=&fn=&sortby=reverse_rank&before=&after=&curpage=2&bugid=-1&comment=&reason=

---
Catalin(ux aka Dino) BOIE
catab at deuroconsult.ro
http://kernel.umbrella.ro/

[-- Attachment #2: Type: TEXT/PLAIN, Size: 433 bytes --]

--- linux/include/net/sock.h	2004-09-07 13:13:31.000000000 +0300
+++ mylinux/include/net/sock.h	2004-09-07 13:14:36.000000000 +0300
@@ -201,7 +201,7 @@ struct sock {
 	wait_queue_head_t	*sk_sleep;
 	struct dst_entry	*sk_dst_cache;
 	rwlock_t		sk_dst_lock;
-	struct xfrm_policy	*sk_policy[2];
+	struct xfrm_policy	*sk_policy[3];
 	atomic_t		sk_rmem_alloc;
 	struct sk_buff_head	sk_receive_queue;
 	atomic_t		sk_wmem_alloc;

             reply	other threads:[~2004-09-07 10:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-07 10:35 Catalin(ux aka Dino) BOIE [this message]
2004-09-07 12:46 ` Herbert Xu
2004-09-07 21:02   ` David S. Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.61.0409071322100.8637@hosting.rdsbv.ro \
    --to=util@deuroconsult.ro \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®