This is not really my area of expertise, but it seems like vertex colors are stored in srgb color space, while other colors are in linear color space. This patch changes it so that when a vertex color attribute is accessed, the color space conversion happens automatically.
Cycles seems to be doing the same conversion in triangle_attribute_float4.