Join Date: May 2007
Location: Lake Forest (El Toro), CA, USA
Like the other posts it's most likely electrical. You don't indicate if you have peddle pressure on the rear. If you have pressure, then your master cylinder is fine. If a master fails, it doesn't always appear as a leak. Pressure but no brakes indicates a clog or a mechanical failure (not very likely but possible).
Since you have your front brake and have yet to see if you have an 'effective' rear, check this brake. If you have both, or even just the front, you can safely ride to the shop for a warranty repair.
I've lost my rear brake once on my old K100RS and on another occasion a separate ABS failure. First time, it was a mis-routed wire on the ABS where the rear wheel ate it. The other was a failed rear master cylinder while on a 1500 mile ride (halfway through). The ride completed but it took a while to stop fixating on the rear brake and pay attention to the road. You may have a similar issue as you ride to the shop with that red triangle flashing at you.
Call the dealer and tell them to expect you but check out the rear brake to see where you are with the failure.