)]}'
{
  "commit": "a05df8fd279e4af0f077de181fb6c4e7d7174267",
  "tree": "3b29c8d00b70dfbf9f9ff8ab90c29b970d0aea33",
  "parents": [
    "3b33de676ac8e84b82f40520ecd0f4722e16b349"
  ],
  "author": {
    "name": "Doug VanLeuven",
    "email": "roamdad@sonic.net",
    "time": "Wed Oct 10 16:11:36 2012 -0700"
  },
  "committer": {
    "name": "David Lamparter",
    "email": "equinox@opensourcerouting.org",
    "time": "Mon Nov 05 11:12:08 2012 -0500"
  },
  "message": "zebra: kernel_socket: fix overflow in RTA_ADDR \u0026 RTA_ATTR\n\nIn zebra/kernel_socket.c, copying sockaddr from *_msghdr:\n\nThere are really 2 different lengths that need to be determined.\n  1) the length required to point to the next sockaddr in the mesg\n     buffer which might include any required padding and\n  2) the actual length of the sockaddr data that needs to be copied\n     into the destination field.\nThey may or may not be the same value.\n\nSizeof sockaddr_in6 is 28, which to pad for alignment purposes on 32\nbit systems with a long of 4 bytes is evenly divided and requires\nno padding. On 64 bit systems, with a long of 8 it is padded with 4\nextra bytes.So the current RTA_* macros are copying 32 bytes into a 28\nbyte field on 64 bitsystems, where the field overflow did not occur\non the 32 bit systems.\n\nSince using sa_len required the use of an #ifdef which couldn\u0027t be used\ndirectly inside a #define, it made sense to move the copy into the\nfunction to allow typdef checking throughout and eliminate the hack\nto suppress compiler warnings.\n\nFixed declaration of cp in ifm_read after compiler noticed type mismatch.\n\nTested on 64bit OS X 10.7, FreeBSD 9.0 amd64 \u0026 i386 (32bit)\nusing gcc \u0026 clang\n\nSigned-off-by: David Lamparter \u003cequinox@opensourcerouting.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ecc6e7905d0f925e4295f2c20c4f2e28d021bb93",
      "old_mode": 33188,
      "old_path": "zebra/kernel_socket.c",
      "new_id": "20c17f9ee802111379445c373e8ad86098904fd1",
      "new_mode": 33188,
      "new_path": "zebra/kernel_socket.c"
    }
  ]
}
