Sorry for the late reply! Here's one way of editing heightmap data:
Create you heighmap texture, say 4097x4097 in VRAM. Call this the terrain texture.
Now decide on the maximum brush size you want to use, say 1025x1025 (you only need to use a small region of this for small brushes). Create *two* textures of this size. Call the first the brush texture, and the second the destination texture.
Ideally, use R32_FLOAT texture formats for all three textures, because you can store any unclamped floating point values (including negative).
Assuming you've got the world location of the mouse, render a quad into the destination texture the size of the brush, using the region from the heightmap and the region from the brush as texture inputs, add/subtract the values (and set min/max values for plateau's and canyons etc.). Now copy the contents of the destination back to the heightmap, and render.
In summary, if I set a brush size of 9 pixels, I'd create a 9x9 fp32 brush texture on the cpu and sub-copy it to the top left of the brush texture. I'd then draw a 9x9 quad to the destination texture using a 9x9 region from the heightmap centred on the mouse plus the 9x9 region from the brush. Do whatever math is appropriate, and then copy the 9x9 region from the destination texture back to the heightmap texture. Render the scene using the new heightmap data.